Skip to content

Commit 0f2ad7e

Browse files
committed
eslint categories
1 parent b51f7bf commit 0f2ad7e

9 files changed

Lines changed: 224 additions & 194 deletions

File tree

eslint-config-bbva/index.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
var rules = require('./rules/basic.json');
1+
module.exports = {
2+
extends: [
3+
'./rules/basic.json',
4+
'./rules/error.json',
5+
'./rules/best-practices.json',
6+
'./rules/variables.json',
7+
'./rules/node.json',
8+
'./rules/issues.json',
9+
'./rules/es6.json',
10+
].map(require.resolve),
211

3-
4-
module.exports = rules;
12+
rules: {
13+
// O_O
14+
}
15+
};

eslint-config-bbva/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-bbva",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "BBVA's ESLint config",
55
"main": "index.js",
66
"scripts": {

eslint-config-bbva/rules/basic.json

Lines changed: 0 additions & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
"modules": true
77
}
88
},
9-
"plugins": [
10-
"import"
11-
],
129
"env": {
1310
"es6": true,
1411
"browser": true,
@@ -19,192 +16,5 @@
1916
"requirejs": true,
2017
"back": true,
2118
"MutationObserver": true
22-
},
23-
"plugins": [],
24-
"rules": {
25-
"comma-dangle": 1,
26-
"no-cond-assign": [2, "except-parens"],
27-
"no-console": 1,
28-
"no-constant-condition": 2,
29-
"no-control-regex": 0,
30-
"no-debugger": 1,
31-
"no-dupe-args": 2,
32-
"no-dupe-keys": 2,
33-
"no-duplicate-case": 2,
34-
"no-empty-character-class": 2,
35-
"no-empty": 1,
36-
"no-ex-assign": 2,
37-
"no-extra-boolean-cast": 2,
38-
"no-extra-parens": 0,
39-
"no-extra-semi": 2,
40-
"no-func-assign": 2,
41-
"no-inner-declarations": 1,
42-
"no-invalid-regexp": 2,
43-
"no-irregular-whitespace": 2,
44-
"no-negated-in-lhs": 1,
45-
"no-obj-calls": 2,
46-
"no-regex-spaces": 2,
47-
"no-sparse-arrays": 2,
48-
"no-unexpected-multiline": 1,
49-
"no-unreachable": 2,
50-
"use-isnan": 2,
51-
"valid-jsdoc": 0,
52-
"valid-typeof": 2,
53-
"accessor-pairs": 0,
54-
"block-scoped-var": 2,
55-
"complexity": [1, 5],
56-
"consistent-return": 1,
57-
"curly": [1, "multi-line"],
58-
"default-case": 2,
59-
"dot-location": [1, "property"],
60-
"dot-notation": 1,
61-
"eqeqeq": 2,
62-
"guard-for-in": 2,
63-
"no-alert": 2,
64-
"no-caller": 2,
65-
"no-case-declarations": 1,
66-
"no-div-regex": 2,
67-
"no-else-return": 1,
68-
"no-empty-pattern": 2,
69-
"no-eq-null": 2,
70-
"no-eval": 2,
71-
"no-extend-native": 2,
72-
"no-extra-bind": 2,
73-
"no-fallthrough": 2,
74-
"no-floating-decimal": 1,
75-
"no-implicit-coercion": 1,
76-
"no-implied-eval": 2,
77-
"no-invalid-this": 1,
78-
"no-iterator": 2,
79-
"no-labels": 2,
80-
"no-lone-blocks": 2,
81-
"no-loop-func": 1,
82-
"no-magic-numbers": [1, { "ignore": [-1, 0, 1, 2] }],
83-
"no-multi-spaces": 1,
84-
"no-multi-str": 2,
85-
"no-native-reassign": 2,
86-
"no-new-func": 1,
87-
"no-new-wrappers": 2,
88-
"no-new": 2,
89-
"no-octal-escape": 2,
90-
"no-octal": 2,
91-
"no-param-reassign": 0,
92-
"no-process-env": 1,
93-
"no-proto": 2,
94-
"no-redeclare": 2,
95-
"no-return-assign": 2,
96-
"no-script-url": 2,
97-
"no-self-compare": 2,
98-
"no-sequences": 2,
99-
"no-throw-literal": 2,
100-
"no-unused-expressions": [1, {
101-
"allowShortCircuit": true,
102-
"allowTernary": true }
103-
],
104-
"no-useless-call": 1,
105-
"no-useless-concat": 1,
106-
"no-void": 2,
107-
"no-warning-comments": [1, { "terms": ["fixme", "xxx"], "location": "anywhere" }],
108-
"no-with": 2,
109-
"radix": 2,
110-
"vars-on-top": 1,
111-
"wrap-iife": [1, "outside"],
112-
"no-delete-var": 2,
113-
"no-label-var": 2,
114-
"no-shadow-restricted-names": 2,
115-
"no-shadow": 2,
116-
"no-undef-init": 2,
117-
"no-undef": 2,
118-
"no-undefined": 1,
119-
"no-unused-vars": 1,
120-
"no-use-before-define": [2, "nofunc"],
121-
"callback-return": 1,
122-
"global-require": 0,
123-
"handle-callback-err": 2,
124-
"no-mixed-requires": 1,
125-
"no-new-require": 2,
126-
"no-path-concat": 2,
127-
"no-process-exit": 2,
128-
"no-restricted-modules": 0,
129-
"no-sync": 2,
130-
"array-bracket-spacing": [1, "never"],
131-
"block-spacing": [1, "never"],
132-
"brace-style": [1, "1tbs", { "allowSingleLine": true }],
133-
"camelcase": 0,
134-
"comma-spacing": [1, { "before": false, "after": true }],
135-
"comma-style": [1, "last"],
136-
"computed-property-spacing": [1, "never"],
137-
"consistent-this": [1, "self"],
138-
"eol-last": 1,
139-
"func-names": 0,
140-
"func-style": [1, "declaration", { "allowArrowFunctions": true }],
141-
"id-length": [0, {"min": 3, "exceptions": ["i", "j", "k", "on"]}],
142-
"id-match": [0, "^_?[a-z]+([A-Z][a-z]+)*$"],
143-
"indent": [1, "tab", { "SwitchCase": 1 }],
144-
"key-spacing": 0,
145-
"lines-around-comment": [1, { "beforeBlockComment": true }],
146-
"linebreak-style": 0,
147-
"max-depth": [1, 3],
148-
"max-len": [1, 120, 4],
149-
"max-nested-callbacks": [1, 3],
150-
"max-params": [1, 3],
151-
"max-statements": 1,
152-
"new-cap": 1,
153-
"new-parens": 2,
154-
"newline-after-var": [1, "always"],
155-
"no-array-constructor": 2,
156-
"no-bitwise": 2,
157-
"no-continue": 2,
158-
"no-inline-comments": 0,
159-
"no-lonely-if": 2,
160-
"no-mixed-spaces-and-tabs": 1,
161-
"no-multiple-empty-lines": [1, {"max": 2, "maxEOF": 1}],
162-
"no-negated-condition": 0,
163-
"no-nested-ternary": 2,
164-
"no-new-object": 2,
165-
"no-plusplus": 0,
166-
"no-restricted-syntax": 0,
167-
"no-spaced-func": 1,
168-
"no-ternary": 0,
169-
"no-trailing-spaces": 1,
170-
"no-underscore-dangle": 0,
171-
"no-unneeded-ternary": 1,
172-
"object-curly-spacing": [1, "always"],
173-
"one-var": 0,
174-
"operator-assignment": [1, "always"],
175-
"operator-linebreak": [1, "none"],
176-
"padded-blocks": [1, "never"],
177-
"quote-props": [1, "consistent-as-needed"],
178-
"quotes": [1, "single", "avoid-escape"],
179-
"require-jsdoc": 0,
180-
"semi-spacing": [1, { "before": false, "after": true }],
181-
"semi": [1, "always"],
182-
"sort-vars": 0,
183-
"space-before-blocks": 1,
184-
"space-before-function-paren": [1, "never"],
185-
"space-in-parens": [1, "never"],
186-
"space-infix-ops": 1,
187-
"space-unary-ops": 1,
188-
"spaced-comment": [1, "always"],
189-
"wrap-regex": 1,
190-
"arrow-body-style": [1, "as-needed"],
191-
"arrow-parens": [2, "always"],
192-
"arrow-spacing": 1,
193-
"constructor-super": 2,
194-
"generator-star-spacing": [1, {"before": true, "after": true}],
195-
"no-class-assign": 2,
196-
"no-const-assign": 2,
197-
"no-dupe-class-members": 2,
198-
"no-this-before-super": 2,
199-
"no-var": 2,
200-
"object-shorthand": [1, "always"],
201-
"prefer-arrow-callback": 1,
202-
"prefer-const": 1,
203-
"prefer-reflect": 0,
204-
"prefer-spread": 1,
205-
"prefer-template": 1,
206-
"require-yield": 1,
207-
"keyword-spacing": 1,
208-
"no-confusing-arrow": 2
20919
}
21020
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"rules": {
3+
"accessor-pairs": 0,
4+
"block-scoped-var": 2,
5+
"complexity": [1, 5],
6+
"consistent-return": 1,
7+
"curly": [1, "multi-line"],
8+
"default-case": 2,
9+
"dot-location": [1, "property"],
10+
"dot-notation": 1,
11+
"eqeqeq": 2,
12+
"guard-for-in": 2,
13+
"no-alert": 2,
14+
"no-caller": 2,
15+
"no-case-declarations": 1,
16+
"no-div-regex": 2,
17+
"no-else-return": 1,
18+
"no-empty-pattern": 2,
19+
"no-eq-null": 2,
20+
"no-eval": 2,
21+
"no-extend-native": 2,
22+
"no-extra-bind": 2,
23+
"no-fallthrough": 2,
24+
"no-floating-decimal": 1,
25+
"no-implicit-coercion": 1,
26+
"no-implied-eval": 2,
27+
"no-invalid-this": 0,
28+
"no-iterator": 2,
29+
"no-labels": 2,
30+
"no-lone-blocks": 2,
31+
"no-loop-func": 1,
32+
"no-magic-numbers": [1, { "ignore": [-1, 0, 1, 2] }],
33+
"no-multi-spaces": 1,
34+
"no-multi-str": 2,
35+
"no-native-reassign": 2,
36+
"no-new-func": 1,
37+
"no-new-wrappers": 2,
38+
"no-new": 2,
39+
"no-octal-escape": 2,
40+
"no-octal": 2,
41+
"no-param-reassign": 0,
42+
"no-process-env": 1,
43+
"no-proto": 2,
44+
"no-redeclare": 2,
45+
"no-return-assign": 2,
46+
"no-script-url": 2,
47+
"no-self-compare": 2,
48+
"no-sequences": 2,
49+
"no-throw-literal": 2,
50+
"no-unused-expressions": [1, {
51+
"allowShortCircuit": true,
52+
"allowTernary": true }
53+
],
54+
"no-useless-call": 1,
55+
"no-useless-concat": 1,
56+
"no-void": 2,
57+
"no-warning-comments": [1, { "terms": ["fixme", "xxx"], "location": "anywhere" }],
58+
"no-with": 2,
59+
"radix": 2,
60+
"vars-on-top": 1,
61+
"wrap-iife": [1, "outside"],
62+
"yoda": 1,
63+
}
64+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"rules": {
3+
"comma-dangle": 1,
4+
"no-cond-assign": [2, "except-parens"],
5+
"no-console": 1,
6+
"no-constant-condition": 2,
7+
"no-control-regex": 0,
8+
"no-debugger": 1,
9+
"no-dupe-args": 2,
10+
"no-dupe-keys": 2,
11+
"no-duplicate-case": 2,
12+
"no-empty-character-class": 2,
13+
"no-empty": 1,
14+
"no-ex-assign": 2,
15+
"no-extra-boolean-cast": 2,
16+
"no-extra-parens": 0,
17+
"no-extra-semi": 2,
18+
"no-func-assign": 2,
19+
"no-inner-declarations": 1,
20+
"no-invalid-regexp": 2,
21+
"no-irregular-whitespace": 2,
22+
"no-negated-in-lhs": 1,
23+
"no-obj-calls": 2,
24+
"no-regex-spaces": 2,
25+
"no-sparse-arrays": 2,
26+
"no-unexpected-multiline": 1,
27+
"no-unreachable": 2,
28+
"use-isnan": 2,
29+
"valid-jsdoc": 0,
30+
"valid-typeof": 2
31+
}
32+
}

eslint-config-bbva/rules/es6.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"rules": {
3+
"arrow-body-style": [1, "as-needed"],
4+
"arrow-parens": [2, "always"],
5+
"arrow-spacing": 1,
6+
"constructor-super": 2,
7+
"generator-star-spacing": [1, {"before": true, "after": true}],
8+
"no-class-assign": 2,
9+
"no-const-assign": 2,
10+
"no-dupe-class-members": 2,
11+
"no-this-before-super": 2,
12+
"no-var": 2,
13+
"object-shorthand": [1, "always"],
14+
"prefer-arrow-callback": 1,
15+
"prefer-const": 1,
16+
"prefer-reflect": 0,
17+
"prefer-spread": 1,
18+
"prefer-template": 1,
19+
"require-yield": 1,
20+
"keyword-spacing": 1,
21+
"no-confusing-arrow": 2
22+
}
23+
}

0 commit comments

Comments
 (0)