@mikey-pro/eslint-config 7.5.0 → 7.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.
package/index.js CHANGED
@@ -34,7 +34,7 @@ module.exports = {
34
34
  'LICENSE',
35
35
  'CNAME',
36
36
  ],
37
- overrides: [...overrides],
37
+ overrides: [...overrides.base],
38
38
  parser: '@babel/eslint-parser',
39
39
  parserOptions: {
40
40
  babelOptions: {
package/overrides.js CHANGED
@@ -262,7 +262,7 @@ const cypress = {
262
262
  extends: ['plugin:cypress/recommended'],
263
263
  };
264
264
 
265
- module.exports = {
265
+ const all = {
266
266
  ts,
267
267
  css,
268
268
  scss,
@@ -279,3 +279,27 @@ module.exports = {
279
279
  jestTs,
280
280
  cypress,
281
281
  };
282
+
283
+ const base = {
284
+ ts,
285
+ css,
286
+ scss,
287
+ less,
288
+ yaml,
289
+ toml,
290
+ md,
291
+ packageJson,
292
+ mdJson,
293
+ html,
294
+ jsonc,
295
+ json5,
296
+ jestJs,
297
+ jestTs,
298
+ cypress,
299
+ };
300
+
301
+ module.exports = {
302
+ ...all,
303
+ all: Object.values(all),
304
+ base: Object.values(base),
305
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "7.5.0",
3
+ "version": "7.5.2",
4
4
  "description": "Mikey Pro ESLint configuration",
5
5
  "main": "index.js",
6
6
  "dependencies": {
@@ -36,6 +36,7 @@
36
36
  },
37
37
  "files": [
38
38
  "index.js",
39
+ "rules.js",
39
40
  "overrides.js",
40
41
  "README.md",
41
42
  "LICENSE"
package/rules.js ADDED
@@ -0,0 +1,157 @@
1
+ module.exports = {
2
+ camelcase: 'warn',
3
+ 'class-methods-use-this': 'off',
4
+ 'constructor-super': 'warn',
5
+ 'dot-notation': 'warn',
6
+ 'func-names': 'off',
7
+ 'import/extensions': ['warn', 'never', { ignorePackages: true }],
8
+ 'import/no-commonjs': 'off',
9
+ 'import/default': 'off',
10
+ 'import/named': 'off',
11
+ 'import/namespace': 'off',
12
+ 'import/no-named-as-default-member': 'off',
13
+ 'import/no-unresolved': [
14
+ 'warn',
15
+ { amd: true, commonjs: true, ignore: ['^node:'] },
16
+ ],
17
+ 'import/order': [
18
+ 'warn',
19
+ {
20
+ alphabetize: {
21
+ order: 'asc',
22
+ },
23
+ 'newlines-between': 'always',
24
+ },
25
+ ],
26
+ 'jsx-quotes': 'warn',
27
+ 'keyword-spacing': 'warn',
28
+ 'no-caller': 'warn',
29
+ 'no-confusing-arrow': 'warn',
30
+ 'no-console': 'off',
31
+ 'no-const-assign': 'warn',
32
+ 'no-delete-var': 'warn',
33
+ 'no-dupe-class-members': 'warn',
34
+ 'no-dupe-keys': 'warn',
35
+ 'no-duplicate-imports': 'warn',
36
+ 'no-else-return': 'warn',
37
+ 'no-empty': 'off',
38
+ 'no-empty-pattern': 'off',
39
+ 'no-extra-parens': 'off',
40
+ 'no-extra-bind': 'warn',
41
+ 'no-extra-semi': 'warn',
42
+ 'no-floating-decimal': 'warn',
43
+ 'no-iterator': 'warn',
44
+ 'no-lonely-if': 'warn',
45
+ 'no-mixed-spaces-and-tabs': ['warn', 'smart-tabs'],
46
+ 'no-multi-str': 'warn',
47
+ 'no-new-wrappers': 'warn',
48
+ 'no-process-exit': 'off',
49
+ 'no-proto': 'warn',
50
+ 'no-redeclare': 'warn',
51
+ 'no-restricted-syntax': [
52
+ 'warn',
53
+ {
54
+ message:
55
+ '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.',
56
+ selector: 'ForInStatement',
57
+ },
58
+ {
59
+ message:
60
+ 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
61
+ selector: 'LabeledStatement',
62
+ },
63
+ {
64
+ message:
65
+ '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
66
+ selector: 'WithStatement',
67
+ },
68
+ ],
69
+ 'no-shadow': 'off',
70
+ 'no-shadow-restricted-names': 'warn',
71
+ 'no-spaced-func': 'warn',
72
+ 'no-this-before-super': 'warn',
73
+ 'no-undef-init': 'warn',
74
+ 'no-underscore-dangle': 'off',
75
+ 'no-unneeded-ternary': 'warn',
76
+ 'no-unused-vars': [
77
+ 'warn',
78
+ {
79
+ args: 'after-used',
80
+ ignoreRestSiblings: true,
81
+ },
82
+ ],
83
+ 'no-useless-call': 'warn',
84
+ 'no-useless-computed-key': 'warn',
85
+ 'no-useless-concat': 'warn',
86
+ 'no-useless-constructor': 'warn',
87
+ 'no-useless-escape': 'warn',
88
+ 'no-useless-rename': 'warn',
89
+ 'no-useless-return': 'warn',
90
+ 'no-var': 'warn',
91
+ 'no-with': 'warn',
92
+ 'object-curly-spacing': ['off', 'always'],
93
+ 'object-shorthand': 'warn',
94
+ 'prefer-arrow-callback': 'warn',
95
+ 'prefer-destructuring': [
96
+ 'warn',
97
+ {
98
+ array: false,
99
+ object: true,
100
+ },
101
+ ],
102
+ 'prefer-rest-params': 'warn',
103
+ 'prefer-spread': 'warn',
104
+ 'prefer-template': 'warn',
105
+ 'prefer-const': 'off',
106
+ 'disable-autofix/prefer-const': 'warn',
107
+ 'quote-props': ['warn', 'as-needed'],
108
+ quotes: [
109
+ 'off',
110
+ 'single',
111
+ {
112
+ allowTemplateLiterals: true,
113
+ avoidEscape: true,
114
+ },
115
+ ],
116
+ radix: 'warn',
117
+ 'filenames/match-regex': 'off',
118
+ 'require-atomic-updates': 'off',
119
+ 'sort-imports': 'off',
120
+ 'rest-spread-spacing': 'off',
121
+ semi: 'off',
122
+ 'sort-vars': 'warn',
123
+ 'space-before-function-paren': [
124
+ 'off',
125
+ { anonymous: 'always', asyncArrow: 'always', named: 'never' },
126
+ ],
127
+ 'space-in-parens': ['off', 'never'],
128
+ 'spaced-comment': [
129
+ 'warn',
130
+ 'always',
131
+ {
132
+ block: {
133
+ balanced: true,
134
+ exceptions: ['*'],
135
+ markers: ['!'],
136
+ },
137
+ line: {
138
+ exceptions: ['-', '+'],
139
+ markers: ['/'],
140
+ },
141
+ },
142
+ ],
143
+ strict: ['warn', 'never'],
144
+ 'unicode-bom': 'warn',
145
+ 'unicorn/filename-case': [
146
+ 'warn',
147
+ {
148
+ cases: {
149
+ camelCase: true,
150
+ pascalCase: true,
151
+ },
152
+ ignore: ['.*.md'],
153
+ },
154
+ ],
155
+ 'unicorn/import-index': ['warn', { ignoreImports: true }],
156
+ 'prettier/prettier': ['warn', { parser: 'babel' }],
157
+ };