@kirill.konshin/eslint-config-next-custom 0.5.0 → 0.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/CHANGELOG.md +12 -0
- package/README.md +3 -2
- package/index.js +12 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ export default defineConfig([
|
|
|
42
42
|
// overrides
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
|
+
includeIgnoreFile(import.meta.url, '.gitignore'),
|
|
45
46
|
includeIgnoreFile(import.meta.url, '.prettierignore'),
|
|
46
47
|
]);
|
|
47
48
|
```
|
|
@@ -70,7 +71,7 @@ export default {
|
|
|
70
71
|
{
|
|
71
72
|
scripts: {
|
|
72
73
|
eslint: 'eslint --fix --concurrency=auto --cache --cache-location node_modules/.cache/eslint', // to see files use --debug
|
|
73
|
-
prettier: 'prettier --write --log-level=warn', // to see files use --log-level=log
|
|
74
|
+
prettier: 'prettier --write --log-level=warn --ignore-path .gitignore --ignore-path .prettierignore', // to see files use --log-level=log
|
|
74
75
|
'lint:all': 'yarn eslint . && yarn prettier .',
|
|
75
76
|
'lint:staged': 'lint-staged',
|
|
76
77
|
},
|
|
@@ -98,7 +99,7 @@ export default listStagedConfig();
|
|
|
98
99
|
```json5
|
|
99
100
|
{
|
|
100
101
|
scripts: {
|
|
101
|
-
prepare: 'husky
|
|
102
|
+
prepare: 'husky || next types || true',
|
|
102
103
|
},
|
|
103
104
|
}
|
|
104
105
|
```
|
package/index.js
CHANGED
|
@@ -52,6 +52,17 @@ const index = [
|
|
|
52
52
|
'import/no-unresolved': 'off',
|
|
53
53
|
'import/no-webpack-loader-syntax': 'off',
|
|
54
54
|
'jsx-a11y/alt-text': 'off',
|
|
55
|
+
'no-restricted-imports': [
|
|
56
|
+
'error',
|
|
57
|
+
{
|
|
58
|
+
paths: [
|
|
59
|
+
{
|
|
60
|
+
name: 'next/router',
|
|
61
|
+
message: 'Please use next/navigation instead of next/router',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
],
|
|
55
66
|
},
|
|
56
67
|
},
|
|
57
68
|
|
|
@@ -79,7 +90,7 @@ export function includeIgnoreFile(importMetaUrl, ignoreFile) {
|
|
|
79
90
|
return includeIgnoreFileCompat(resolve(dirname(fileURLToPath(importMetaUrl)), ignoreFile));
|
|
80
91
|
}
|
|
81
92
|
|
|
82
|
-
const eslintExts = '*.{js,jsx,ts,tsx,cjs,cts,mjs,mts,md,mdx,htm,html,
|
|
93
|
+
const eslintExts = '*.{js,jsx,ts,tsx,cjs,cts,mjs,mts,md,mdx,htm,html,vue}';
|
|
83
94
|
const prettierExts = '*.{css,scss,sass,less,yml,yaml,json,json5,graphql,graphqls}';
|
|
84
95
|
|
|
85
96
|
export const prettier = {
|