eslint-config-dolmios 2.0.2 → 2.0.4
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/README.md +3 -3
- package/eslint.config.js +20 -3
- package/package.json +1 -1
- package/rules.js +10 -0
- package/configs/swc.json +0 -16
package/README.md
CHANGED
|
@@ -13,14 +13,14 @@ This ESLint configuration is designed for use with ESLint v9, which uses a flat
|
|
|
13
13
|
### Setting Up ESLint
|
|
14
14
|
1. **Create an ESLint Configuration File**: In the root of your project, create a file named `eslint.config.js`.
|
|
15
15
|
|
|
16
|
-
2. **Import and Extend the Configuration**: Add the following content to `eslint.config.
|
|
16
|
+
2. **Import and Extend the Configuration**: Add the following content to `eslint.config.mjs` to use the `eslint-config-dolmios` configuration:
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
|
-
import
|
|
20
|
+
import dolmios from "eslint-config-dolmios";
|
|
21
21
|
|
|
22
22
|
export default [
|
|
23
|
-
...
|
|
23
|
+
...dolmios,
|
|
24
24
|
// Add any project-specific overrides here
|
|
25
25
|
];
|
|
26
26
|
```
|
package/eslint.config.js
CHANGED
|
@@ -24,11 +24,16 @@ export default [
|
|
|
24
24
|
'**/public/**',
|
|
25
25
|
'**/storybook-static/**',
|
|
26
26
|
'**/test/**',
|
|
27
|
-
'**/tests/**'
|
|
27
|
+
'**/tests/**',
|
|
28
|
+
'**/eslint.config.js',
|
|
29
|
+
'**/eslint.config.mjs',
|
|
30
|
+
'**/eslint.config.cjs',
|
|
31
|
+
'**/next.config.js',
|
|
32
|
+
'**/next-sitemap.config.js'
|
|
28
33
|
],
|
|
29
34
|
},
|
|
30
35
|
{
|
|
31
|
-
files: ['**/*.
|
|
36
|
+
files: ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs', '**/*.ts', '**/*.tsx'],
|
|
32
37
|
languageOptions: {
|
|
33
38
|
parser: tsParser,
|
|
34
39
|
parserOptions: {
|
|
@@ -38,7 +43,8 @@ export default [
|
|
|
38
43
|
},
|
|
39
44
|
globals: {
|
|
40
45
|
...globals.browser,
|
|
41
|
-
...globals.node
|
|
46
|
+
...globals.node,
|
|
47
|
+
google: true,
|
|
42
48
|
}
|
|
43
49
|
},
|
|
44
50
|
linterOptions: {
|
|
@@ -58,4 +64,15 @@ export default [
|
|
|
58
64
|
},
|
|
59
65
|
rules: customRules,
|
|
60
66
|
},
|
|
67
|
+
{
|
|
68
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
69
|
+
languageOptions: {
|
|
70
|
+
parserOptions: {
|
|
71
|
+
project: './tsconfig.json',
|
|
72
|
+
tsconfigRootDir: '.',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
rules: {
|
|
76
|
+
},
|
|
77
|
+
},
|
|
61
78
|
];
|
package/package.json
CHANGED
package/rules.js
CHANGED
|
@@ -8,6 +8,10 @@ const typescriptRules = {
|
|
|
8
8
|
'warn',
|
|
9
9
|
{ args: 'none', ignoreRestSiblings: true, argsIgnorePattern: '^_' },
|
|
10
10
|
],
|
|
11
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
12
|
+
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': 'allow-with-description' }],
|
|
13
|
+
'@typescript-eslint/no-inferrable-types': 'warn',
|
|
14
|
+
'@typescript-eslint/prefer-as-const': 'warn',
|
|
11
15
|
'no-unused-vars': 'off',
|
|
12
16
|
};
|
|
13
17
|
|
|
@@ -78,6 +82,12 @@ const nextRules = {
|
|
|
78
82
|
'@next/next/no-html-link-for-pages': 'warn',
|
|
79
83
|
'@next/next/no-img-element': 'warn',
|
|
80
84
|
'@next/next/no-unwanted-polyfillio': 'warn',
|
|
85
|
+
'@next/next/no-css-tags': 'warn',
|
|
86
|
+
'@next/next/no-sync-scripts': 'warn',
|
|
87
|
+
'@next/next/google-font-display': 'warn',
|
|
88
|
+
'@next/next/google-font-preconnect': 'warn',
|
|
89
|
+
'@next/next/next-script-for-ga': 'warn',
|
|
90
|
+
'@next/next/no-page-custom-font': 'warn',
|
|
81
91
|
};
|
|
82
92
|
|
|
83
93
|
// Perfectionist rules
|
package/configs/swc.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
|
3
|
-
"jsc": {
|
|
4
|
-
"parser": {
|
|
5
|
-
"decorators": true,
|
|
6
|
-
"dynamicImport": true,
|
|
7
|
-
"syntax": "typescript",
|
|
8
|
-
"tsx": true
|
|
9
|
-
},
|
|
10
|
-
"target": "es2022"
|
|
11
|
-
},
|
|
12
|
-
"minify": false,
|
|
13
|
-
"module": {
|
|
14
|
-
"type": "es6"
|
|
15
|
-
}
|
|
16
|
-
}
|