@robinblomberg/eslint-config-robinblomberg 0.15.3 → 0.17.0-beta1
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 +11 -13
- package/package.json +14 -11
package/index.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
const { defineConfig } = require('eslint-define-config');
|
|
2
|
+
|
|
1
3
|
const IS_DEVELOPMENT = !process.env.CI && process.env.NODE_ENV !== 'production';
|
|
2
4
|
const error = 'error';
|
|
3
5
|
const off = 'off';
|
|
4
6
|
const warn = IS_DEVELOPMENT ? 'warn' : 'error';
|
|
5
7
|
|
|
6
|
-
module.exports = {
|
|
8
|
+
module.exports = defineConfig({
|
|
7
9
|
env: {
|
|
8
10
|
browser: true,
|
|
9
|
-
|
|
11
|
+
es2024: true,
|
|
10
12
|
node: true,
|
|
11
13
|
},
|
|
14
|
+
extends: ['plugin:sonarjs/recommended', 'plugin:unicorn/recommended'],
|
|
12
15
|
globals: {
|
|
13
16
|
globalThis: true,
|
|
14
17
|
},
|
|
@@ -134,7 +137,6 @@ module.exports = {
|
|
|
134
137
|
'private-instance-field',
|
|
135
138
|
'protected-instance-field',
|
|
136
139
|
'public-instance-field',
|
|
137
|
-
'private-abstract-field',
|
|
138
140
|
'protected-abstract-field',
|
|
139
141
|
'public-abstract-field',
|
|
140
142
|
'static-field',
|
|
@@ -155,7 +157,6 @@ module.exports = {
|
|
|
155
157
|
'private-instance-method',
|
|
156
158
|
'protected-instance-method',
|
|
157
159
|
'public-instance-method',
|
|
158
|
-
'private-abstract-method',
|
|
159
160
|
'protected-abstract-method',
|
|
160
161
|
'public-abstract-method',
|
|
161
162
|
'static-method',
|
|
@@ -249,7 +250,7 @@ module.exports = {
|
|
|
249
250
|
'@typescript-eslint/no-loop-func': warn,
|
|
250
251
|
'@typescript-eslint/no-loss-of-precision': warn,
|
|
251
252
|
'@typescript-eslint/no-magic-numbers': [
|
|
252
|
-
|
|
253
|
+
off,
|
|
253
254
|
{
|
|
254
255
|
ignore: [-1, 0, 1, 2, 3, '-1n', '0n', '1n', '2n', '3n'],
|
|
255
256
|
ignoreEnums: true,
|
|
@@ -332,10 +333,7 @@ module.exports = {
|
|
|
332
333
|
'@typescript-eslint/require-await': warn,
|
|
333
334
|
'@typescript-eslint/restrict-plus-operands': [
|
|
334
335
|
error,
|
|
335
|
-
{
|
|
336
|
-
allowAny: false,
|
|
337
|
-
checkCompoundAssignments: true,
|
|
338
|
-
},
|
|
336
|
+
{ allowAny: false },
|
|
339
337
|
],
|
|
340
338
|
// Disabled due to false positives:
|
|
341
339
|
'@typescript-eslint/restrict-template-expressions': off,
|
|
@@ -728,11 +726,11 @@ module.exports = {
|
|
|
728
726
|
ecmaFeatures: {
|
|
729
727
|
jsx: true,
|
|
730
728
|
},
|
|
731
|
-
ecmaVersion:
|
|
729
|
+
ecmaVersion: 'latest',
|
|
732
730
|
requireConfigFile: false,
|
|
733
731
|
sourceType: 'module',
|
|
734
732
|
},
|
|
735
|
-
plugins: ['import', 'jsdoc', 'sort-keys'],
|
|
733
|
+
plugins: ['import', 'jsdoc', 'sort-keys', 'sonarjs', 'unicorn'],
|
|
736
734
|
root: true,
|
|
737
735
|
rules: {
|
|
738
736
|
'accessor-pairs': warn,
|
|
@@ -1334,7 +1332,7 @@ module.exports = {
|
|
|
1334
1332
|
},
|
|
1335
1333
|
],
|
|
1336
1334
|
'sort-keys': off,
|
|
1337
|
-
'sort-keys/sort-keys-fix': [
|
|
1335
|
+
'sort-keys/sort-keys-fix': [off, 'asc', { natural: false }],
|
|
1338
1336
|
'sort-vars': warn,
|
|
1339
1337
|
'space-before-blocks': [warn, 'always'],
|
|
1340
1338
|
'space-before-function-paren': [warn, 'always'],
|
|
@@ -1384,4 +1382,4 @@ module.exports = {
|
|
|
1384
1382
|
version: 'detect',
|
|
1385
1383
|
},
|
|
1386
1384
|
},
|
|
1387
|
-
};
|
|
1385
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robinblomberg/eslint-config-robinblomberg",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0-beta1",
|
|
4
4
|
"author": "Robin Blomberg",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -12,23 +12,26 @@
|
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://github.com/RobinBlomberg/eslint-config#readme",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@babel/core": "^7.22.
|
|
16
|
-
"@babel/eslint-parser": "^7.22.
|
|
17
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
18
|
-
"@typescript-eslint/parser": "^
|
|
19
|
-
"eslint-plugin-import": "^2.
|
|
20
|
-
"eslint-plugin-jsdoc": "^46.
|
|
15
|
+
"@babel/core": "^7.22.9",
|
|
16
|
+
"@babel/eslint-parser": "^7.22.9",
|
|
17
|
+
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
|
18
|
+
"@typescript-eslint/parser": "^6.2.1",
|
|
19
|
+
"eslint-plugin-import": "^2.28.0",
|
|
20
|
+
"eslint-plugin-jsdoc": "^46.4.5",
|
|
21
21
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
22
|
-
"eslint-plugin-react": "^7.
|
|
22
|
+
"eslint-plugin-react": "^7.33.1",
|
|
23
23
|
"eslint-plugin-sort-keys": "^2.3.5"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@robinblomberg/eslint-config-robinblomberg": "^0.
|
|
27
|
-
"@types/node": "*"
|
|
26
|
+
"@robinblomberg/eslint-config-robinblomberg": "^0.16.0",
|
|
27
|
+
"@types/node": "*",
|
|
28
|
+
"eslint-define-config": "^1.22.0",
|
|
29
|
+
"eslint-plugin-sonarjs": "^0.19.0",
|
|
30
|
+
"eslint-plugin-unicorn": "^48.0.1"
|
|
28
31
|
},
|
|
29
32
|
"peerDependencies": {
|
|
30
33
|
"eslint": "^8.43.0",
|
|
31
|
-
"typescript": ">=
|
|
34
|
+
"typescript": ">=4.2.0"
|
|
32
35
|
},
|
|
33
36
|
"scripts": {
|
|
34
37
|
"lint": "eslint **/*.{js,ts}",
|