@kasoa/eslint-config 0.0.9 → 0.0.10
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
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,kCAwBjC,CAAC"}
|
|
@@ -15,6 +15,11 @@ export const typescriptEslintConfig = defineConfig({
|
|
|
15
15
|
typescriptEslint.configs.strictTypeChecked,
|
|
16
16
|
typescriptEslint.configs.stylisticTypeChecked,
|
|
17
17
|
],
|
|
18
|
+
languageOptions: {
|
|
19
|
+
parserOptions: {
|
|
20
|
+
projectService: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
18
23
|
rules: {
|
|
19
24
|
"@typescript-eslint/no-unused-vars": "off",
|
|
20
25
|
"@typescript-eslint/consistent-type-imports": "error",
|
package/package.json
CHANGED
|
@@ -16,6 +16,11 @@ export const typescriptEslintConfig = defineConfig({
|
|
|
16
16
|
typescriptEslint.configs.strictTypeChecked,
|
|
17
17
|
typescriptEslint.configs.stylisticTypeChecked,
|
|
18
18
|
],
|
|
19
|
+
languageOptions: {
|
|
20
|
+
parserOptions: {
|
|
21
|
+
projectService: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
19
24
|
rules: {
|
|
20
25
|
"@typescript-eslint/no-unused-vars": "off",
|
|
21
26
|
"@typescript-eslint/consistent-type-imports": "error",
|