eslint-config-brightspace 2.12.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configs/base.js +15 -15
- package/configs/browser.js +3 -3
- package/configs/testing.js +11 -6
- package/package.json +3 -2
package/configs/base.js
CHANGED
|
@@ -7,12 +7,7 @@ export default [js.configs.recommended, {
|
|
|
7
7
|
'@stylistic': stylistic
|
|
8
8
|
},
|
|
9
9
|
'rules': {
|
|
10
|
-
'comma-spacing': 2, // nr
|
|
11
|
-
'eol-last': 2, // nr
|
|
12
10
|
'eqeqeq': [2, 'always', { 'null': 'ignore' }], // nr
|
|
13
|
-
'keyword-spacing': 2,
|
|
14
|
-
'linebreak-style': ['error', 'unix'], // nr
|
|
15
|
-
'new-parens': 2, // nr
|
|
16
11
|
'no-debugger': 2,
|
|
17
12
|
'no-dupe-args': 2,
|
|
18
13
|
'no-dupe-keys': 2,
|
|
@@ -20,10 +15,7 @@ export default [js.configs.recommended, {
|
|
|
20
15
|
'no-ex-assign': 2,
|
|
21
16
|
'no-fallthrough': 2,
|
|
22
17
|
'no-invalid-this': 2, // nr
|
|
23
|
-
'no-multiple-empty-lines': [2, { 'max': 1 }], // nr
|
|
24
|
-
'no-multi-spaces': 2, // nr
|
|
25
18
|
'no-new-wrappers': 2, // nr
|
|
26
|
-
'no-trailing-spaces': 2, // nr
|
|
27
19
|
'no-undef': 2,
|
|
28
20
|
'no-unneeded-ternary': 2, // nr
|
|
29
21
|
'no-unreachable': 2,
|
|
@@ -35,16 +27,24 @@ export default [js.configs.recommended, {
|
|
|
35
27
|
}],
|
|
36
28
|
'no-use-before-define': [2, 'nofunc'], // nr
|
|
37
29
|
'no-var': 2, // nr
|
|
38
|
-
'object-curly-spacing': [2, 'always'],
|
|
39
30
|
'prefer-const': 2, // nr
|
|
40
|
-
'semi': 2, // nr
|
|
41
|
-
'space-before-blocks': [2, 'always'], // nr
|
|
42
|
-
'space-before-function-paren': [2, 'never'], //nr
|
|
43
|
-
'space-in-parens': [2, 'never'],
|
|
44
|
-
'space-infix-ops': 2, // nr
|
|
45
31
|
'strict': [2, 'global'], // nr
|
|
46
32
|
'valid-typeof': 2,
|
|
33
|
+
'@stylistic/comma-spacing': 2, // nr
|
|
34
|
+
'@stylistic/eol-last': 2, // nr
|
|
47
35
|
'@stylistic/indent': [2, 'tab', { 'SwitchCase': 1 }], // nr
|
|
48
|
-
'@stylistic/
|
|
36
|
+
'@stylistic/keyword-spacing': 2,
|
|
37
|
+
'@stylistic/linebreak-style': ['error', 'unix'], // nr
|
|
38
|
+
'@stylistic/new-parens': 2, // nr
|
|
39
|
+
'@stylistic/no-multi-spaces': 2, // nr
|
|
40
|
+
'@stylistic/no-multiple-empty-lines': [2, { 'max': 1 }], // nr
|
|
41
|
+
'@stylistic/no-trailing-spaces': 2, // nr
|
|
42
|
+
'@stylistic/object-curly-spacing': [2, 'always'],
|
|
43
|
+
'@stylistic/quotes': [2, 'single', { 'avoidEscape': true }], // nr
|
|
44
|
+
'@stylistic/semi': 2, // nr
|
|
45
|
+
'@stylistic/space-before-blocks': [2, 'always'], // nr
|
|
46
|
+
'@stylistic/space-before-function-paren': [2, 'never'], //nr
|
|
47
|
+
'@stylistic/space-in-parens': [2, 'never'],
|
|
48
|
+
'@stylistic/space-infix-ops': 2 // nr
|
|
49
49
|
}
|
|
50
50
|
}];
|
package/configs/browser.js
CHANGED
|
@@ -25,8 +25,7 @@ export default [
|
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
rules: {
|
|
28
|
-
'
|
|
29
|
-
'no-confusing-arrow': 2,
|
|
28
|
+
'no-console': ['error', { 'allow': ['warn', 'error'] }],
|
|
30
29
|
'no-duplicate-imports': 2,
|
|
31
30
|
'no-useless-constructor': 2,
|
|
32
31
|
'prefer-arrow-callback': 2,
|
|
@@ -36,7 +35,8 @@ export default [
|
|
|
36
35
|
'strict': [2, 'never'],
|
|
37
36
|
'import/extensions': ['error', 'ignorePackages'],
|
|
38
37
|
'import/no-absolute-path': 2,
|
|
39
|
-
'
|
|
38
|
+
'@stylistic/arrow-spacing': 2,
|
|
39
|
+
'@stylistic/no-confusing-arrow': 2,
|
|
40
40
|
...getSortMemberRules()
|
|
41
41
|
}
|
|
42
42
|
}
|
package/configs/testing.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import globals from 'globals';
|
|
2
1
|
import litConfig from './lit.js';
|
|
2
|
+
import mochaPlugin from 'eslint-plugin-mocha';
|
|
3
3
|
|
|
4
4
|
export default [
|
|
5
5
|
...litConfig,
|
|
6
|
+
mochaPlugin.configs.recommended,
|
|
6
7
|
{
|
|
7
|
-
'
|
|
8
|
-
|
|
9
|
-
...globals.mocha,
|
|
10
|
-
}
|
|
8
|
+
'plugins': {
|
|
9
|
+
mochaPlugin
|
|
11
10
|
},
|
|
12
11
|
'rules': {
|
|
13
|
-
'
|
|
12
|
+
'mocha/consistent-spacing-between-blocks': 'off',
|
|
13
|
+
'mocha/max-top-level-suites': 'off',
|
|
14
|
+
'mocha/no-exclusive-tests': 'error',
|
|
15
|
+
'mocha/no-mocha-arrows': 'off',
|
|
16
|
+
'mocha/no-return-from-async': 'error',
|
|
17
|
+
'mocha/no-setup-in-describe': 'off',
|
|
18
|
+
'no-invalid-this': 0,
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-brightspace",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Common Brightspace eslint configs.",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js"
|
|
@@ -37,8 +37,9 @@
|
|
|
37
37
|
"eslint-plugin-html": "^8",
|
|
38
38
|
"eslint-plugin-import": "^2",
|
|
39
39
|
"eslint-plugin-lit": "^2",
|
|
40
|
-
"eslint-plugin-
|
|
40
|
+
"eslint-plugin-mocha": "^11",
|
|
41
41
|
"eslint-plugin-react": "^7",
|
|
42
|
+
"eslint-plugin-sort-class-members": "^1",
|
|
42
43
|
"globals": "^17"
|
|
43
44
|
}
|
|
44
45
|
}
|