@nice-move/eslint-config-base 0.9.15 → 0.9.17
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/lib/typescript.cjs +27 -16
- package/package.json +8 -8
package/lib/typescript.cjs
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const {
|
|
4
|
-
overrides: [{ rules: base }],
|
|
5
|
-
} = require('@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js');
|
|
6
|
-
const {
|
|
7
|
-
rules,
|
|
8
|
-
} = require('@typescript-eslint/eslint-plugin/dist/configs/recommended.js');
|
|
9
|
-
|
|
10
|
-
function filterObject(object, filter) {
|
|
11
|
-
return Object.fromEntries(
|
|
12
|
-
Object.entries(object).filter(([key, value]) => filter(key, value)),
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
3
|
module.exports = {
|
|
17
4
|
overrides: [
|
|
18
5
|
{
|
|
19
6
|
files: ['*.ts', '*.tsx', '*.mts', '*.cts'],
|
|
20
7
|
parser: '@typescript-eslint/parser',
|
|
21
|
-
plugins: ['@typescript-eslint'],
|
|
8
|
+
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
22
9
|
// parserOptions: {
|
|
23
10
|
// tsconfigRootDir: process.cwd(),
|
|
24
11
|
// project: ['./tsconfig.json'],
|
|
@@ -28,9 +15,33 @@ module.exports = {
|
|
|
28
15
|
// 'airbnb-typescript',
|
|
29
16
|
// ],
|
|
30
17
|
rules: {
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
'@typescript-eslint/ban-types': 'error',
|
|
19
|
+
'@typescript-eslint/no-array-constructor': 'error',
|
|
20
|
+
'@typescript-eslint/no-duplicate-enum-values': 'error',
|
|
21
|
+
'@typescript-eslint/no-dynamic-delete': 'error',
|
|
22
|
+
'@typescript-eslint/no-extra-non-null-assertion': 'error',
|
|
23
|
+
'@typescript-eslint/no-extraneous-class': 'error',
|
|
24
|
+
'@typescript-eslint/no-invalid-void-type': 'error',
|
|
25
|
+
'@typescript-eslint/no-loss-of-precision': 'error',
|
|
26
|
+
'@typescript-eslint/no-misused-new': 'error',
|
|
27
|
+
'@typescript-eslint/no-namespace': 'error',
|
|
28
|
+
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
|
|
29
|
+
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
30
|
+
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
31
|
+
'@typescript-eslint/no-this-alias': 'error',
|
|
32
|
+
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
|
|
33
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
|
|
34
|
+
'@typescript-eslint/no-useless-constructor': 'error',
|
|
35
|
+
'@typescript-eslint/no-var-requires': 'error',
|
|
36
|
+
'@typescript-eslint/prefer-as-const': 'error',
|
|
37
|
+
'@typescript-eslint/prefer-literal-enum-member': 'error',
|
|
38
|
+
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
|
39
|
+
'@typescript-eslint/triple-slash-reference': 'error',
|
|
40
|
+
'@typescript-eslint/unified-signatures': 'error',
|
|
41
|
+
|
|
42
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
33
43
|
'@typescript-eslint/ban-ts-comment': 0,
|
|
44
|
+
'@typescript-eslint/no-empty-function': 0,
|
|
34
45
|
'@typescript-eslint/no-unused-vars': [
|
|
35
46
|
'warn',
|
|
36
47
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-move/eslint-config-base",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "A `eslint` config for best practice",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
},
|
|
35
35
|
"main": "index.cjs",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@babel/core": "^7.22.
|
|
38
|
-
"@babel/eslint-parser": "^7.22.
|
|
37
|
+
"@babel/core": "^7.22.9",
|
|
38
|
+
"@babel/eslint-parser": "^7.22.9",
|
|
39
39
|
"@babel/plugin-syntax-import-attributes": "^7.22.5",
|
|
40
40
|
"@nice-move/eslint-plugin-html": "0.0.0-beta.3",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
42
|
-
"@typescript-eslint/parser": "^
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
42
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
43
43
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
44
44
|
"eslint-config-prettier": "^8.8.0",
|
|
45
45
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"eslint-plugin-n": "^16.0.1",
|
|
49
49
|
"eslint-plugin-promise": "^6.1.1",
|
|
50
50
|
"eslint-plugin-sonarjs": "^0.19.0",
|
|
51
|
-
"eslint-plugin-unicorn": "^
|
|
52
|
-
"espree": "^9.
|
|
51
|
+
"eslint-plugin-unicorn": "^48.0.0",
|
|
52
|
+
"espree": "^9.6.1",
|
|
53
53
|
"resolve.exports": "^2.0.2",
|
|
54
54
|
"settingz": "^0.2.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"eslint": "^8.
|
|
57
|
+
"eslint": "^8.45.0"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": "^16.15.0 || ^18.12.0"
|