@fullstacksjs/eslint-config 14.0.1 → 14.1.0
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 +4 -4
- package/cjs/index.d.ts +30 -6
- package/package.json +14 -14
- package/src/index.d.ts +30 -6
- package/src/modules/ignore.mjs +2 -0
package/README.md
CHANGED
|
@@ -194,24 +194,24 @@ export default defineConfig({
|
|
|
194
194
|
|
|
195
195
|
## What's included?
|
|
196
196
|
|
|
197
|
-
* [@eslint-react/eslint-plugin](https://eslint-react.xyz
|
|
197
|
+
* [@eslint-react/eslint-plugin](https://eslint-react.xyz)
|
|
198
198
|
* [@next/eslint-plugin-next](https://nextjs.org/docs/basic-features/eslint#eslint-plugin)
|
|
199
199
|
* [@stylistic/eslint-plugin](https://eslint.style/packages/default)
|
|
200
|
+
* [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest)
|
|
200
201
|
* [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress)
|
|
201
202
|
* [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x)
|
|
202
203
|
* [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)
|
|
203
204
|
* [eslint-plugin-jest-formatting](https://github.com/dangreenisrael/eslint-plugin-jest-formatting)
|
|
204
205
|
* [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
|
|
205
206
|
* [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n)
|
|
206
|
-
* [eslint-plugin-perfectionist](https://perfectionist.dev
|
|
207
|
+
* [eslint-plugin-perfectionist](https://perfectionist.dev)
|
|
207
208
|
* [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright)
|
|
208
209
|
* [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)
|
|
209
210
|
* [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise)
|
|
210
211
|
* [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
|
|
211
212
|
* [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook#readme)
|
|
212
213
|
* [eslint-plugin-better-tailwindcss](https://github.com/schoero/eslint-plugin-better-tailwindcss)
|
|
213
|
-
* [eslint
|
|
214
|
-
* [typescript-eslint](https://typescript-eslint.io/)
|
|
214
|
+
* [typescript-eslint](https://typescript-eslint.io)
|
|
215
215
|
* [eslint-plugin-regexp](https://www.npmjs.com/package/eslint-plugin-regexp)
|
|
216
216
|
|
|
217
217
|
That's all. Feel free to use 💛
|
package/cjs/index.d.ts
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Granular options to configure the project service.
|
|
5
|
+
*/
|
|
6
|
+
export interface ProjectServiceOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Globs of files to allow running with the default project compiler options
|
|
9
|
+
* despite not being matched by the project service.
|
|
10
|
+
*/
|
|
11
|
+
allowDefaultProject?: string[];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Path to a TSConfig to use instead of TypeScript's default project configuration.
|
|
15
|
+
* @default 'tsconfig.json'
|
|
16
|
+
*/
|
|
17
|
+
defaultProject?: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Whether to allow TypeScript plugins as configured in the TSConfig.
|
|
21
|
+
*/
|
|
22
|
+
loadTypeScriptPlugins?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The maximum number of files {@link allowDefaultProject} may match.
|
|
26
|
+
* Each file match slows down linting, so if you do need to use this, please
|
|
27
|
+
* file an informative issue on typescript-eslint explaining why - so we can
|
|
28
|
+
* help you avoid using it!
|
|
29
|
+
* @default 8
|
|
30
|
+
*/
|
|
31
|
+
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number;
|
|
8
32
|
}
|
|
9
33
|
|
|
10
34
|
type TailwindConfig = {
|
|
@@ -93,7 +117,7 @@ export interface Options extends Linter.Config {
|
|
|
93
117
|
* Controls [TypeScript plugin](https://www.npmjs.com/package/typescript-eslint).
|
|
94
118
|
* @default true - If you have `typescript` in your dependencies.
|
|
95
119
|
*/
|
|
96
|
-
typescript?: boolean | { projectService?: boolean |
|
|
120
|
+
typescript?: boolean | { projectService?: boolean | ProjectServiceOptions; tsconfigRootDir?: string; cacheLifetime?: number };
|
|
97
121
|
/**
|
|
98
122
|
* Disables expensive rules.
|
|
99
123
|
* @default false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "14.0
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@eslint-react/eslint-plugin": "2.13.0",
|
|
41
|
-
"@eslint/compat": "2.0.
|
|
41
|
+
"@eslint/compat": "2.0.3",
|
|
42
42
|
"@next/eslint-plugin-next": "16.1.6",
|
|
43
43
|
"@stylistic/eslint-plugin": "5.8.0",
|
|
44
|
-
"@vitest/eslint-plugin": "1.6.
|
|
44
|
+
"@vitest/eslint-plugin": "1.6.13",
|
|
45
45
|
"deepmerge": "4.3.1",
|
|
46
|
-
"eslint-plugin-better-tailwindcss": "4.3.
|
|
46
|
+
"eslint-plugin-better-tailwindcss": "4.3.2",
|
|
47
47
|
"eslint-plugin-cypress": "5.3.0",
|
|
48
|
-
"eslint-plugin-import-x": "4.16.
|
|
49
|
-
"eslint-plugin-jest": "29.15.
|
|
48
|
+
"eslint-plugin-import-x": "4.16.2",
|
|
49
|
+
"eslint-plugin-jest": "29.15.1",
|
|
50
50
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
51
51
|
"eslint-plugin-n": "17.24.0",
|
|
52
52
|
"eslint-plugin-perfectionist": "5.5.0",
|
|
@@ -55,27 +55,27 @@
|
|
|
55
55
|
"eslint-plugin-promise": "7.2.1",
|
|
56
56
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
57
57
|
"eslint-plugin-regexp": "3.0.0",
|
|
58
|
-
"eslint-plugin-storybook": "10.
|
|
59
|
-
"globals": "17.
|
|
58
|
+
"eslint-plugin-storybook": "10.3.3",
|
|
59
|
+
"globals": "17.4.0",
|
|
60
60
|
"local-pkg": "1.1.2",
|
|
61
61
|
"typescript-eslint": "8.56.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@eslint/eslintrc": "3.3.
|
|
64
|
+
"@eslint/eslintrc": "3.3.5",
|
|
65
65
|
"@eslint/js": "9.39.2",
|
|
66
66
|
"@semantic-release/github": "12.0.6",
|
|
67
|
-
"@semantic-release/npm": "13.1.
|
|
67
|
+
"@semantic-release/npm": "13.1.5",
|
|
68
68
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
69
69
|
"@types/eslint": "9.6.1",
|
|
70
|
-
"cspell": "9.
|
|
70
|
+
"cspell": "9.7.0",
|
|
71
71
|
"eslint": "9.39.2",
|
|
72
72
|
"husky": "9.1.7",
|
|
73
|
-
"jest": "30.
|
|
74
|
-
"lint-staged": "16.
|
|
73
|
+
"jest": "30.3.0",
|
|
74
|
+
"lint-staged": "16.4.0",
|
|
75
75
|
"pinst": "3.0.0",
|
|
76
76
|
"prettier": "3.8.1",
|
|
77
77
|
"semantic-release": "25.0.3",
|
|
78
|
-
"storybook": "10.
|
|
78
|
+
"storybook": "10.3.3",
|
|
79
79
|
"typescript": "5.9.3",
|
|
80
80
|
"unbuild": "3.6.1"
|
|
81
81
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import type { Linter } from 'eslint';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Granular options to configure the project service.
|
|
5
|
+
*/
|
|
6
|
+
export interface ProjectServiceOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Globs of files to allow running with the default project compiler options
|
|
9
|
+
* despite not being matched by the project service.
|
|
10
|
+
*/
|
|
11
|
+
allowDefaultProject?: string[];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Path to a TSConfig to use instead of TypeScript's default project configuration.
|
|
15
|
+
* @default 'tsconfig.json'
|
|
16
|
+
*/
|
|
17
|
+
defaultProject?: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Whether to allow TypeScript plugins as configured in the TSConfig.
|
|
21
|
+
*/
|
|
22
|
+
loadTypeScriptPlugins?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The maximum number of files {@link allowDefaultProject} may match.
|
|
26
|
+
* Each file match slows down linting, so if you do need to use this, please
|
|
27
|
+
* file an informative issue on typescript-eslint explaining why - so we can
|
|
28
|
+
* help you avoid using it!
|
|
29
|
+
* @default 8
|
|
30
|
+
*/
|
|
31
|
+
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number;
|
|
8
32
|
}
|
|
9
33
|
|
|
10
34
|
type TailwindConfig = {
|
|
@@ -93,7 +117,7 @@ export interface Options extends Linter.Config {
|
|
|
93
117
|
* Controls [TypeScript plugin](https://www.npmjs.com/package/typescript-eslint).
|
|
94
118
|
* @default true - If you have `typescript` in your dependencies.
|
|
95
119
|
*/
|
|
96
|
-
typescript?: boolean | { projectService?: boolean |
|
|
120
|
+
typescript?: boolean | { projectService?: boolean | ProjectServiceOptions; tsconfigRootDir?: string; cacheLifetime?: number };
|
|
97
121
|
/**
|
|
98
122
|
* Disables expensive rules.
|
|
99
123
|
* @default false
|
package/src/modules/ignore.mjs
CHANGED
|
@@ -11,8 +11,10 @@ function ignores(options = {}) {
|
|
|
11
11
|
const ignorePatterns = [...ignoreGlobs, ...(options.ignores ?? [])];
|
|
12
12
|
|
|
13
13
|
const shouldUseGitignore = options.gitignore && options.gitignore.length > 0;
|
|
14
|
+
|
|
14
15
|
if (shouldUseGitignore) {
|
|
15
16
|
const gitignorePatterns = getGitignorePatterns(options.gitignore);
|
|
17
|
+
|
|
16
18
|
if (gitignorePatterns.length > 0) {
|
|
17
19
|
ignorePatterns.push(...gitignorePatterns);
|
|
18
20
|
}
|