@mikey-pro/eslint-config 2.3.3 → 2.5.2

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.
Files changed (2) hide show
  1. package/index.cjs +45 -33
  2. package/package.json +10 -9
package/index.cjs CHANGED
@@ -4,12 +4,13 @@ module.exports = {
4
4
  'standard',
5
5
  'eslint:recommended',
6
6
  'plugin:unicorn/all',
7
- 'plugin:react/recommended',
8
- 'plugin:react-hooks/recommended',
7
+ 'plugin:github/recommended',
9
8
  'plugin:jsx-a11y/recommended',
10
9
  'plugin:sonarjs/recommended',
11
10
  'plugin:compat/recommended',
12
11
  'plugin:css-modules/recommended',
12
+ 'plugin:react/recommended',
13
+ 'plugin:react-hooks/recommended',
13
14
  'plugin:prettier/recommended',
14
15
  ],
15
16
  overrides: [
@@ -19,7 +20,7 @@ module.exports = {
19
20
  extends: ['plugin:md/recommended'],
20
21
  rules: {
21
22
  'md/remark': [
22
- 'error',
23
+ 2,
23
24
  {
24
25
  plugins: [
25
26
  'preset-lint-markdown-style-guide',
@@ -27,13 +28,13 @@ module.exports = {
27
28
  ],
28
29
  },
29
30
  ],
30
- 'prettier/prettier': ['error', { parser: 'markdown' }],
31
+ 'prettier/prettier': [2, { parser: 'markdown' }],
31
32
  },
32
33
  },
33
34
  {
34
35
  files: ['*.md.json'],
35
36
  rules: {
36
- 'prettier/prettier': ['error', { parser: 'json' }],
37
+ 'prettier/prettier': [2, { parser: 'json' }],
37
38
  },
38
39
  },
39
40
  {
@@ -41,15 +42,15 @@ module.exports = {
41
42
  parser: '@html-eslint/parser',
42
43
  extends: ['plugin:@html-eslint/recommended'],
43
44
  rules: {
44
- 'spaced-comment': 'off',
45
- '@html-eslint/indent': 'off',
46
- '@html-eslint/no-extra-spacing-attrs': 'off',
47
- '@html-eslint/require-closing-tags': 'off',
45
+ 'spaced-comment': 0,
46
+ '@html-eslint/indent': 0,
47
+ '@html-eslint/no-extra-spacing-attrs': 0,
48
+ '@html-eslint/require-closing-tags': 0,
48
49
  'disable-autofix/@html-eslint/require-closing-tags': [
49
- 'error',
50
+ 2,
50
51
  { selfClosing: 'always' },
51
52
  ],
52
- 'prettier/prettier': ['error', { parser: 'html' }],
53
+ 'prettier/prettier': [2, { parser: 'html' }],
53
54
  },
54
55
  },
55
56
  {
@@ -58,7 +59,7 @@ module.exports = {
58
59
  extends: ['plugin:vue/vue3-recommended', '@vue/airbnb'],
59
60
  rules: {
60
61
  'vue/html-self-closing': [
61
- 'error',
62
+ 2,
62
63
  {
63
64
  html: {
64
65
  void: 'always',
@@ -69,18 +70,18 @@ module.exports = {
69
70
  math: 'always',
70
71
  },
71
72
  ],
72
- 'prettier/prettier': 'off',
73
+ 'prettier/prettier': 0,
73
74
  },
74
75
  },
75
76
  {
76
77
  files: ['*.svelte'],
77
78
  processor: 'svelte3/svelte3',
78
79
  rules: {
79
- 'import/first': 'off',
80
- 'import/no-duplicates': 'off',
81
- 'import/no-mutable-exports': 'off',
82
- 'import/no-unresolved': 'off',
83
- 'prettier/prettier': 'off',
80
+ 'import/first': 0,
81
+ 'import/no-duplicates': 0,
82
+ 'import/no-mutable-exports': 0,
83
+ 'import/no-unresolved': 0,
84
+ 'prettier/prettier': 0,
84
85
  },
85
86
  },
86
87
  ],
@@ -93,16 +94,12 @@ module.exports = {
93
94
  },
94
95
  rules: {
95
96
  'no-restricted-syntax': [
96
- 'error',
97
+ 2,
97
98
  {
98
99
  selector: 'ForInStatement',
99
100
  message:
100
101
  'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
101
102
  },
102
- // {
103
- // selector: 'ForOfStatement',
104
- // message: 'iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.',
105
- // },
106
103
  {
107
104
  selector: 'LabeledStatement',
108
105
  message:
@@ -115,16 +112,28 @@ module.exports = {
115
112
  },
116
113
  ],
117
114
  camelcase: 0,
118
- 'no-console': 'off',
119
- 'func-names': 'off',
120
- 'no-process-exit': 'off',
121
- 'class-methods-use-this': 'off',
122
- 'no-underscore-dangle': 'off',
115
+ 'no-console': 0,
116
+ 'func-names': 0,
117
+ 'no-process-exit': 0,
118
+ 'class-methods-use-this': 0,
119
+ 'no-underscore-dangle': 0,
123
120
  'import/no-unresolved': [
124
121
  2,
125
122
  { commonjs: true, amd: true, ignore: ['^node:'] },
126
123
  ],
127
- 'import/extensions': 'off',
124
+ 'import/order': [
125
+ 2,
126
+ {
127
+ alphabetize: {
128
+ order: 'asc',
129
+ caseInsensitive: true,
130
+ },
131
+ 'newlines-between': 'always',
132
+ },
133
+ ],
134
+ 'import/extensions': ['error', 'always', { ignorePackages: true }],
135
+ 'import/no-commonjs': 0,
136
+ 'sort-imports': 0,
128
137
  'constructor-super': 2,
129
138
  'no-caller': 2,
130
139
  'no-const-assign': 2,
@@ -188,7 +197,7 @@ module.exports = {
188
197
  'unicode-bom': 2,
189
198
  'valid-jsdoc': 0,
190
199
  'spaced-comment': [
191
- 'error',
200
+ 2,
192
201
  'always',
193
202
  {
194
203
  line: {
@@ -235,9 +244,10 @@ module.exports = {
235
244
  'react/no-string-refs': 2,
236
245
  'react-hooks/rules-of-hooks': 2,
237
246
  'react-hooks/exhaustive-deps': 1,
238
- 'unicorn/import-index': ['error', { ignoreImports: true }],
247
+ 'unicorn/import-index': [2, { ignoreImports: true }],
248
+ 'filenames/match-regex': 0,
239
249
  'unicorn/filename-case': [
240
- 'error',
250
+ 2,
241
251
  {
242
252
  cases: {
243
253
  camelCase: true,
@@ -246,7 +256,7 @@ module.exports = {
246
256
  ignore: ['README.md'],
247
257
  },
248
258
  ],
249
- 'prettier/prettier': ['error'],
259
+ 'prettier/prettier': [2],
250
260
  },
251
261
  plugins: [
252
262
  'import',
@@ -260,6 +270,8 @@ module.exports = {
260
270
  'react-hooks',
261
271
  'unicorn',
262
272
  'svelte3',
273
+ 'sonarjs',
274
+ 'github',
263
275
  ],
264
276
  ignorePatterns: [
265
277
  '!.*',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "2.3.3",
3
+ "version": "2.5.2",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.cjs",
6
6
  "dependencies": {
@@ -9,32 +9,33 @@
9
9
  "@babel/eslint-plugin": "^7.14",
10
10
  "@babel/plugin-transform-react-jsx": "^7.16.0",
11
11
  "@babel/preset-env": "^7.16",
12
- "@html-eslint/eslint-plugin": "^0.12.0",
13
- "@html-eslint/parser": "^0.12.0",
12
+ "@html-eslint/eslint-plugin": "^0.13.0",
13
+ "@html-eslint/parser": "^0.13.0",
14
14
  "@vue/babel-plugin-jsx": "^1.1.1",
15
15
  "@vue/eslint-config-airbnb": "^6.0",
16
16
  "babel-preset-airbnb": "^5.0.0",
17
- "eslint": "^8.2.0",
17
+ "eslint": "^8.3.0",
18
18
  "eslint-config-airbnb": "^19.0",
19
19
  "eslint-config-prettier": "^8.3",
20
- "eslint-config-standard": "16.0.3",
20
+ "eslint-config-standard": "^16.0.3",
21
21
  "eslint-import-resolver-alias": "^1.1",
22
22
  "eslint-plugin-compat": "^4.0",
23
23
  "eslint-plugin-css-modules": "^2.11",
24
24
  "eslint-plugin-disable-autofix": "^0.1.6",
25
+ "eslint-plugin-github": "^4.3.5",
25
26
  "eslint-plugin-import": "^2.25",
26
27
  "eslint-plugin-json": "^3.1",
27
28
  "eslint-plugin-json-format": "^2.0",
28
29
  "eslint-plugin-jsx-a11y": "^6.5",
29
30
  "eslint-plugin-md": "^1.0",
30
- "eslint-plugin-node": "11.1.0",
31
+ "eslint-plugin-node": "^11.1.0",
31
32
  "eslint-plugin-prettier": "^4.0",
32
- "eslint-plugin-promise": "5.1.1",
33
+ "eslint-plugin-promise": "^5.1.1",
33
34
  "eslint-plugin-react": "^7.27",
34
35
  "eslint-plugin-react-hooks": "^4.3",
35
- "eslint-plugin-sonar": "^0.6.1",
36
+ "eslint-plugin-sonarjs": "^0.10.0",
36
37
  "eslint-plugin-svelte3": "^3.2.1",
37
- "eslint-plugin-unicorn": "^38.0.1",
38
+ "eslint-plugin-unicorn": "^39.0.0",
38
39
  "eslint-plugin-vue": "^8.1",
39
40
  "vue-eslint-parser": "^8.0"
40
41
  },