@mikey-pro/eslint-config 8.0.7 → 8.0.9
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 +14 -7
- package/package.json +13 -6
- package/rules.js +0 -9
package/index.js
CHANGED
|
@@ -16,8 +16,8 @@ import perfectionistPlugin from 'eslint-plugin-perfectionist';
|
|
|
16
16
|
import noSecretsPlugin from 'eslint-plugin-no-secrets';
|
|
17
17
|
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests';
|
|
18
18
|
|
|
19
|
-
import { baseOverrides } from './overrides';
|
|
20
|
-
import { baseRules } from './rules';
|
|
19
|
+
import { baseOverrides } from './overrides.js';
|
|
20
|
+
import { baseRules } from './rules.js';
|
|
21
21
|
|
|
22
22
|
/** @type {import('eslint').Linter.Config[]} */
|
|
23
23
|
const config = [
|
|
@@ -90,7 +90,12 @@ const config = [
|
|
|
90
90
|
...compatPlugin.configs.recommended.rules,
|
|
91
91
|
...cssModules.configs.recommended.rules,
|
|
92
92
|
...importPlugin.configs.recommended.rules,
|
|
93
|
-
'prettier/prettier': 'warn',
|
|
93
|
+
'prettier/prettier': ['warn', {
|
|
94
|
+
parser: 'babel',
|
|
95
|
+
endOfLine: 'lf',
|
|
96
|
+
singleQuote: true,
|
|
97
|
+
trailingComma: 'all'
|
|
98
|
+
}],
|
|
94
99
|
|
|
95
100
|
// Security
|
|
96
101
|
'security/detect-object-injection': 'warn',
|
|
@@ -132,6 +137,12 @@ const config = [
|
|
|
132
137
|
'import/parsers': {
|
|
133
138
|
'@typescript-eslint/parser': ['.ts', '.tsx', '.mts', '.cts'],
|
|
134
139
|
},
|
|
140
|
+
'import/extensions': ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.cjs'],
|
|
141
|
+
'import/resolver': {
|
|
142
|
+
node: {
|
|
143
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx', '.mjs', '.cjs']
|
|
144
|
+
}
|
|
145
|
+
},
|
|
135
146
|
},
|
|
136
147
|
},
|
|
137
148
|
...baseOverrides,
|
|
@@ -140,7 +151,3 @@ const config = [
|
|
|
140
151
|
export default config;
|
|
141
152
|
export { baseRules } from './rules.js';
|
|
142
153
|
export { baseOverrides } from './overrides.js';
|
|
143
|
-
|
|
144
|
-
if (typeof module !== 'undefined' && module.exports) {
|
|
145
|
-
module.exports = config;
|
|
146
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikey-pro/eslint-config",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.9",
|
|
4
4
|
"description": "Mikey Pro ESLint configuration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -46,12 +46,10 @@
|
|
|
46
46
|
"eslint-plugin-sonarjs": "^3.0.1",
|
|
47
47
|
"eslint-plugin-regexp": "^2.7.0",
|
|
48
48
|
"eslint-plugin-etc": "^2.0.3",
|
|
49
|
-
"eslint-plugin-functional": "^8.0.0",
|
|
50
49
|
"eslint-plugin-typescript-sort-keys": "^3.3.0",
|
|
51
50
|
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
52
51
|
"eslint-plugin-write-good-comments": "^0.2.0",
|
|
53
52
|
"eslint-plugin-boundaries": "^5.0.1",
|
|
54
|
-
"eslint-plugin-immutable": "^1.0.0",
|
|
55
53
|
"eslint-plugin-radar": "^0.2.1",
|
|
56
54
|
"eslint-plugin-optimize-regex": "^1.2.1"
|
|
57
55
|
},
|
|
@@ -122,8 +120,17 @@
|
|
|
122
120
|
"yarn": ">=4.0.0"
|
|
123
121
|
},
|
|
124
122
|
"exports": {
|
|
125
|
-
".":
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
".": {
|
|
124
|
+
"import": "./index.js",
|
|
125
|
+
"require": "./index.js"
|
|
126
|
+
},
|
|
127
|
+
"./rules": {
|
|
128
|
+
"import": "./rules.js",
|
|
129
|
+
"require": "./rules.js"
|
|
130
|
+
},
|
|
131
|
+
"./overrides": {
|
|
132
|
+
"import": "./overrides.js",
|
|
133
|
+
"require": "./overrides.js"
|
|
134
|
+
}
|
|
128
135
|
}
|
|
129
136
|
}
|
package/rules.js
CHANGED
|
@@ -233,11 +233,6 @@ export const baseRules = {
|
|
|
233
233
|
'security/detect-child-process': 'warn',
|
|
234
234
|
'security/detect-disable-mustache-escape': 'error',
|
|
235
235
|
|
|
236
|
-
// Functional Programming
|
|
237
|
-
'functional/no-let': 'warn',
|
|
238
|
-
'functional/prefer-readonly-type': 'warn',
|
|
239
|
-
'functional/no-mixed-type': 'warn',
|
|
240
|
-
|
|
241
236
|
// Code Organization
|
|
242
237
|
'typescript-sort-keys/interface': 'warn',
|
|
243
238
|
'typescript-sort-keys/string-enum': 'warn',
|
|
@@ -271,10 +266,6 @@ export const baseRules = {
|
|
|
271
266
|
}
|
|
272
267
|
],
|
|
273
268
|
|
|
274
|
-
// Immutability
|
|
275
|
-
'immutable/no-mutation': 'warn',
|
|
276
|
-
'immutable/no-let': 'warn',
|
|
277
|
-
|
|
278
269
|
// Performance
|
|
279
270
|
'optimize-regex/optimize-regex': 'warn',
|
|
280
271
|
'radar/no-duplicate-string': ['warn', 5],
|