@kasoa/eslint-config 0.0.9 → 0.0.11
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 +13 -27
- package/dist/base/typescript-eslint.d.ts.map +1 -1
- package/dist/base/typescript-eslint.js +6 -10
- package/dist/react/eslint-react.d.ts.map +1 -1
- package/dist/react/eslint-react.js +3 -1
- package/dist/react/jsx-a11y.d.ts.map +1 -1
- package/dist/react/jsx-a11y.js +4 -1
- package/dist/react/react-compiler.d.ts.map +1 -1
- package/dist/react/react-compiler.js +4 -1
- package/dist/react/react-hooks.d.ts.map +1 -1
- package/dist/react/react-hooks.js +4 -1
- package/dist/react/react-refresh.d.ts.map +1 -1
- package/dist/react/react-refresh.js +4 -1
- package/dist/react/react-you-might-not-need-an-effect.d.ts.map +1 -1
- package/dist/react/react-you-might-not-need-an-effect.js +4 -1
- package/package.json +1 -1
- package/src/base/typescript-eslint.ts +6 -10
- package/src/react/eslint-react.ts +7 -8
- package/src/react/jsx-a11y.ts +4 -1
- package/src/react/react-compiler.ts +4 -3
- package/src/react/react-hooks.ts +4 -3
- package/src/react/react-refresh.ts +4 -3
- package/src/react/react-you-might-not-need-an-effect.ts +4 -3
package/README.md
CHANGED
|
@@ -18,51 +18,37 @@ Import the desired config in your `eslint.config.ts` (using ESLint's flat config
|
|
|
18
18
|
|
|
19
19
|
### React Projects
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
```js
|
|
22
|
+
export { react as default } from "@kasoa/eslint-config/react";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Node.js Projects
|
|
22
26
|
|
|
23
27
|
```js
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
export { node as default } from "@kasoa/eslint-config/node";
|
|
29
|
+
```
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
projectService: true,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
31
|
+
### Base Config
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
export { base as default } from "@kasoa/eslint-config/base";
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### Custom Overrides
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Use `defineConfig` to add project-specific rules:
|
|
40
40
|
|
|
41
41
|
```js
|
|
42
42
|
import { node } from "@kasoa/eslint-config/node";
|
|
43
43
|
import { defineConfig } from "eslint/config";
|
|
44
44
|
|
|
45
45
|
export default defineConfig(node, {
|
|
46
|
-
// Add custom rules or overrides here
|
|
47
46
|
rules: {
|
|
48
47
|
"no-console": "warn",
|
|
49
48
|
},
|
|
50
49
|
});
|
|
51
50
|
```
|
|
52
51
|
|
|
53
|
-
### Base Config
|
|
54
|
-
|
|
55
|
-
For minimal setups (e.g., libraries or custom extensions):
|
|
56
|
-
|
|
57
|
-
```js
|
|
58
|
-
import { base } from "@kasoa/eslint-config/base";
|
|
59
|
-
import { defineConfig } from "eslint/config";
|
|
60
|
-
|
|
61
|
-
export default defineConfig(base, {
|
|
62
|
-
// Customize as needed
|
|
63
|
-
});
|
|
64
|
-
```
|
|
65
|
-
|
|
66
52
|
## Configurations
|
|
67
53
|
|
|
68
54
|
- **`base`**: Core rules for TypeScript, imports, code quality, and testing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/typescript-eslint.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/typescript-eslint.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,kCAejC,CAAC"}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { defineConfig } from "eslint/config";
|
|
2
2
|
import typescriptEslint from "typescript-eslint";
|
|
3
3
|
export const typescriptEslintConfig = defineConfig({
|
|
4
|
-
files: [
|
|
5
|
-
"**/*.js",
|
|
6
|
-
"**/*.jsx",
|
|
7
|
-
"**/*.mjs",
|
|
8
|
-
"**/*.cjs",
|
|
9
|
-
"**/*.ts",
|
|
10
|
-
"**/*.tsx",
|
|
11
|
-
"**/*.mts",
|
|
12
|
-
"**/*.cts",
|
|
13
|
-
],
|
|
4
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
14
5
|
extends: [
|
|
15
6
|
typescriptEslint.configs.strictTypeChecked,
|
|
16
7
|
typescriptEslint.configs.stylisticTypeChecked,
|
|
17
8
|
],
|
|
9
|
+
languageOptions: {
|
|
10
|
+
parserOptions: {
|
|
11
|
+
projectService: true,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
18
14
|
rules: {
|
|
19
15
|
"@typescript-eslint/no-unused-vars": "off",
|
|
20
16
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-react.d.ts","sourceRoot":"","sources":["../../src/react/eslint-react.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"eslint-react.d.ts","sourceRoot":"","sources":["../../src/react/eslint-react.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,kCAO5B,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import eslintReact from "@eslint-react/eslint-plugin";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
|
-
export const eslintReactConfig = defineConfig(
|
|
3
|
+
export const eslintReactConfig = defineConfig({
|
|
4
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
5
|
+
extends: [eslintReact.configs["strict-type-checked"]],
|
|
4
6
|
rules: {
|
|
5
7
|
"@eslint-react/prefer-namespace-import": "error",
|
|
6
8
|
"@eslint-react/no-unstable-context-value": "off",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-a11y.d.ts","sourceRoot":"","sources":["../../src/react/jsx-a11y.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"jsx-a11y.d.ts","sourceRoot":"","sources":["../../src/react/jsx-a11y.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,kCAGxB,CAAC"}
|
package/dist/react/jsx-a11y.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
|
-
export const jsxA11yConfig = defineConfig(
|
|
3
|
+
export const jsxA11yConfig = defineConfig({
|
|
4
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
5
|
+
extends: [jsxA11y.flatConfigs.strict],
|
|
6
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-compiler.d.ts","sourceRoot":"","sources":["../../src/react/react-compiler.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"react-compiler.d.ts","sourceRoot":"","sources":["../../src/react/react-compiler.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,kCAG9B,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import reactCompiler from "eslint-plugin-react-compiler";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
|
-
export const reactCompilerConfig = defineConfig(
|
|
3
|
+
export const reactCompilerConfig = defineConfig({
|
|
4
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
5
|
+
extends: [reactCompiler.configs.recommended],
|
|
6
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-hooks.d.ts","sourceRoot":"","sources":["../../src/react/react-hooks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"react-hooks.d.ts","sourceRoot":"","sources":["../../src/react/react-hooks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,kCAG3B,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
|
-
export const reactHooksConfig = defineConfig(
|
|
3
|
+
export const reactHooksConfig = defineConfig({
|
|
4
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
5
|
+
extends: [reactHooks.configs.flat["recommended-latest"]],
|
|
6
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-refresh.d.ts","sourceRoot":"","sources":["../../src/react/react-refresh.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"react-refresh.d.ts","sourceRoot":"","sources":["../../src/react/react-refresh.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,kCAG7B,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import reactRefresh from "eslint-plugin-react-refresh";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
|
-
export const reactRefreshConfig = defineConfig(
|
|
3
|
+
export const reactRefreshConfig = defineConfig({
|
|
4
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
5
|
+
extends: [reactRefresh.configs.recommended],
|
|
6
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-you-might-not-need-an-effect.d.ts","sourceRoot":"","sources":["../../src/react/react-you-might-not-need-an-effect.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kCAAkC,
|
|
1
|
+
{"version":3,"file":"react-you-might-not-need-an-effect.d.ts","sourceRoot":"","sources":["../../src/react/react-you-might-not-need-an-effect.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kCAAkC,kCAG7C,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import reactYouMightNotNeedAnEffect from "eslint-plugin-react-you-might-not-need-an-effect";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
|
-
export const reactYouMightNotNeedAnEffectConfig = defineConfig(
|
|
3
|
+
export const reactYouMightNotNeedAnEffectConfig = defineConfig({
|
|
4
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
5
|
+
extends: [reactYouMightNotNeedAnEffect.configs.recommended],
|
|
6
|
+
});
|
package/package.json
CHANGED
|
@@ -2,20 +2,16 @@ import { defineConfig } from "eslint/config";
|
|
|
2
2
|
import typescriptEslint from "typescript-eslint";
|
|
3
3
|
|
|
4
4
|
export const typescriptEslintConfig = defineConfig({
|
|
5
|
-
files: [
|
|
6
|
-
"**/*.js",
|
|
7
|
-
"**/*.jsx",
|
|
8
|
-
"**/*.mjs",
|
|
9
|
-
"**/*.cjs",
|
|
10
|
-
"**/*.ts",
|
|
11
|
-
"**/*.tsx",
|
|
12
|
-
"**/*.mts",
|
|
13
|
-
"**/*.cts",
|
|
14
|
-
],
|
|
5
|
+
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}"],
|
|
15
6
|
extends: [
|
|
16
7
|
typescriptEslint.configs.strictTypeChecked,
|
|
17
8
|
typescriptEslint.configs.stylisticTypeChecked,
|
|
18
9
|
],
|
|
10
|
+
languageOptions: {
|
|
11
|
+
parserOptions: {
|
|
12
|
+
projectService: true,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
19
15
|
rules: {
|
|
20
16
|
"@typescript-eslint/no-unused-vars": "off",
|
|
21
17
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import eslintReact from "@eslint-react/eslint-plugin";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
3
|
|
|
4
|
-
export const eslintReactConfig = defineConfig(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
4
|
+
export const eslintReactConfig = defineConfig({
|
|
5
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
6
|
+
extends: [eslintReact.configs["strict-type-checked"]],
|
|
7
|
+
rules: {
|
|
8
|
+
"@eslint-react/prefer-namespace-import": "error",
|
|
9
|
+
"@eslint-react/no-unstable-context-value": "off",
|
|
11
10
|
},
|
|
12
|
-
);
|
|
11
|
+
});
|
package/src/react/jsx-a11y.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
3
|
|
|
4
|
-
export const jsxA11yConfig = defineConfig(
|
|
4
|
+
export const jsxA11yConfig = defineConfig({
|
|
5
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
6
|
+
extends: [jsxA11y.flatConfigs.strict],
|
|
7
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import reactCompiler from "eslint-plugin-react-compiler";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
3
|
|
|
4
|
-
export const reactCompilerConfig = defineConfig(
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const reactCompilerConfig = defineConfig({
|
|
5
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
6
|
+
extends: [reactCompiler.configs.recommended],
|
|
7
|
+
});
|
package/src/react/react-hooks.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
3
|
|
|
4
|
-
export const reactHooksConfig = defineConfig(
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const reactHooksConfig = defineConfig({
|
|
5
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
6
|
+
extends: [reactHooks.configs.flat["recommended-latest"]],
|
|
7
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import reactRefresh from "eslint-plugin-react-refresh";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
3
|
|
|
4
|
-
export const reactRefreshConfig = defineConfig(
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const reactRefreshConfig = defineConfig({
|
|
5
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
6
|
+
extends: [reactRefresh.configs.recommended],
|
|
7
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import reactYouMightNotNeedAnEffect from "eslint-plugin-react-you-might-not-need-an-effect";
|
|
2
2
|
import { defineConfig } from "eslint/config";
|
|
3
3
|
|
|
4
|
-
export const reactYouMightNotNeedAnEffectConfig = defineConfig(
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const reactYouMightNotNeedAnEffectConfig = defineConfig({
|
|
5
|
+
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
6
|
+
extends: [reactYouMightNotNeedAnEffect.configs.recommended],
|
|
7
|
+
});
|