@mikey-pro/eslint-config 2.5.2 → 3.0.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.
Files changed (2) hide show
  1. package/index.cjs +75 -10
  2. package/package.json +7 -2
package/index.cjs CHANGED
@@ -9,11 +9,59 @@ module.exports = {
9
9
  'plugin:sonarjs/recommended',
10
10
  'plugin:compat/recommended',
11
11
  'plugin:css-modules/recommended',
12
- 'plugin:react/recommended',
13
- 'plugin:react-hooks/recommended',
14
12
  'plugin:prettier/recommended',
15
13
  ],
16
14
  overrides: [
15
+ {
16
+ files: ['*.css'],
17
+ rules: {
18
+ 'prettier/prettier': [2, { parser: 'css' }],
19
+ },
20
+ },
21
+ {
22
+ files: ['*.scss'],
23
+ rules: {
24
+ 'prettier/prettier': [2, { parser: 'scss' }],
25
+ },
26
+ },
27
+ {
28
+ files: ['*.less'],
29
+ rules: {
30
+ 'prettier/prettier': [2, { parser: 'less' }],
31
+ },
32
+ },
33
+ {
34
+ files: ['*.yaml', '*.yml'],
35
+ plugins: ['yaml'],
36
+ extends: ['plugin:yaml/recommended'],
37
+ rules: {
38
+ 'prettier/prettier': [2, { parser: 'yaml' }],
39
+ },
40
+ },
41
+ {
42
+ files: ['*.toml'],
43
+ parser: 'toml-eslint-parser',
44
+ extends: ['plugin:toml/standard'],
45
+ rules: {
46
+ 'prettier/prettier': [2],
47
+ },
48
+ },
49
+ {
50
+ files: ['*.jsx'],
51
+ extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
52
+ plugins: ['react', 'react-hooks'],
53
+ rules: {
54
+ 'spaced-comment': 0,
55
+ '@html-eslint/indent': 0,
56
+ '@html-eslint/no-extra-spacing-attrs': 0,
57
+ '@html-eslint/require-closing-tags': 0,
58
+ 'disable-autofix/@html-eslint/require-closing-tags': [
59
+ 2,
60
+ { selfClosing: 'always' },
61
+ ],
62
+ 'prettier/prettier': [2, { parser: 'html' }],
63
+ },
64
+ },
17
65
  {
18
66
  files: ['*.md'],
19
67
  parser: 'markdown-eslint-parser',
@@ -41,6 +89,7 @@ module.exports = {
41
89
  files: ['*.html'],
42
90
  parser: '@html-eslint/parser',
43
91
  extends: ['plugin:@html-eslint/recommended'],
92
+ plugins: ['@html-eslint'],
44
93
  rules: {
45
94
  'spaced-comment': 0,
46
95
  '@html-eslint/indent': 0,
@@ -70,12 +119,13 @@ module.exports = {
70
119
  math: 'always',
71
120
  },
72
121
  ],
73
- 'prettier/prettier': 0,
122
+ 'prettier/prettier': [2, { parser: 'vue' }],
74
123
  },
75
124
  },
76
125
  {
77
126
  files: ['*.svelte'],
78
127
  processor: 'svelte3/svelte3',
128
+ plugins: ['svelte3'],
79
129
  rules: {
80
130
  'import/first': 0,
81
131
  'import/no-duplicates': 0,
@@ -84,6 +134,23 @@ module.exports = {
84
134
  'prettier/prettier': 0,
85
135
  },
86
136
  },
137
+ {
138
+ files: ['*.json', '*.jsonc', '*rc'],
139
+ extends: ['plugin:jsonc/all'],
140
+ parser: 'jsonc-eslint-parser',
141
+ plugins: ['json-format'],
142
+ rules: {
143
+ 'prettier/prettier': [2, { parser: 'json' }],
144
+ },
145
+ },
146
+ {
147
+ files: ['*.json5'],
148
+ extends: ['plugin:jsonc/all'],
149
+ parser: 'jsonc-eslint-parser',
150
+ rules: {
151
+ 'prettier/prettier': [2, { parser: 'json5' }],
152
+ },
153
+ },
87
154
  ],
88
155
  env: {
89
156
  browser: true,
@@ -126,12 +193,15 @@ module.exports = {
126
193
  {
127
194
  alphabetize: {
128
195
  order: 'asc',
129
- caseInsensitive: true,
130
196
  },
131
197
  'newlines-between': 'always',
132
198
  },
133
199
  ],
134
200
  'import/extensions': ['error', 'always', { ignorePackages: true }],
201
+ 'eslint-comments/no-use': [
202
+ 'error',
203
+ { allow: ['eslint-disable', 'eslint-disable-next-line'] },
204
+ ],
135
205
  'import/no-commonjs': 0,
136
206
  'sort-imports': 0,
137
207
  'constructor-super': 2,
@@ -256,20 +326,15 @@ module.exports = {
256
326
  ignore: ['README.md'],
257
327
  },
258
328
  ],
259
- 'prettier/prettier': [2],
329
+ 'prettier/prettier': [2, { parser: 'babel' }],
260
330
  },
261
331
  plugins: [
262
332
  'import',
263
333
  'prettier',
264
- 'json-format',
265
334
  'css-modules',
266
- '@html-eslint',
267
335
  'disable-autofix',
268
336
  '@babel',
269
- 'react',
270
- 'react-hooks',
271
337
  'unicorn',
272
- 'svelte3',
273
338
  'sonarjs',
274
339
  'github',
275
340
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "2.5.2",
3
+ "version": "3.0.0",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.cjs",
6
6
  "dependencies": {
@@ -14,7 +14,6 @@
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.3.0",
18
17
  "eslint-config-airbnb": "^19.0",
19
18
  "eslint-config-prettier": "^8.3",
20
19
  "eslint-config-standard": "^16.0.3",
@@ -26,6 +25,7 @@
26
25
  "eslint-plugin-import": "^2.25",
27
26
  "eslint-plugin-json": "^3.1",
28
27
  "eslint-plugin-json-format": "^2.0",
28
+ "eslint-plugin-jsonc": "^2.0.0",
29
29
  "eslint-plugin-jsx-a11y": "^6.5",
30
30
  "eslint-plugin-md": "^1.0",
31
31
  "eslint-plugin-node": "^11.1.0",
@@ -35,10 +35,15 @@
35
35
  "eslint-plugin-react-hooks": "^4.3",
36
36
  "eslint-plugin-sonarjs": "^0.10.0",
37
37
  "eslint-plugin-svelte3": "^3.2.1",
38
+ "eslint-plugin-toml": "^0.3.0",
38
39
  "eslint-plugin-unicorn": "^39.0.0",
39
40
  "eslint-plugin-vue": "^8.1",
41
+ "eslint-plugin-yaml": "^0.5.0",
40
42
  "vue-eslint-parser": "^8.0"
41
43
  },
44
+ "peerDependencies": {
45
+ "eslint": ">=8.3.0"
46
+ },
42
47
  "files": [
43
48
  "index.cjs",
44
49
  "README.md",