@castiron/eslint-config 1.0.0-beta.0 → 1.0.0-beta.1
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/configs/{configs-base.mjs → base.mjs} +0 -5
- package/configs/js.mjs +10 -0
- package/configs/{config-ts.mjs → ts.mjs} +2 -0
- package/index.mjs +15 -0
- package/package.json +1 -1
- package/configs/config-js.mjs +0 -17
- package/index.js +0 -15
- /package/configs/{config-react.mjs → react.mjs} +0 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import ts from "@typescript-eslint/eslint-plugin";
|
|
2
1
|
import unusedImports from "eslint-plugin-unused-imports";
|
|
3
2
|
import globals from "globals";
|
|
4
3
|
|
|
5
4
|
const baseConfig = {
|
|
6
|
-
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
7
5
|
languageOptions: {
|
|
8
6
|
globals: {
|
|
9
7
|
...globals.browser,
|
|
@@ -11,8 +9,6 @@ const baseConfig = {
|
|
|
11
9
|
}
|
|
12
10
|
},
|
|
13
11
|
rules: {
|
|
14
|
-
...ts.configs.recommended.rules,
|
|
15
|
-
...ts.configs["eslint-recommended"].rules,
|
|
16
12
|
"array-callback-return": 0,
|
|
17
13
|
"arrow-body-style": 0,
|
|
18
14
|
"global-require": 0,
|
|
@@ -58,7 +54,6 @@ const baseConfig = {
|
|
|
58
54
|
},
|
|
59
55
|
plugins: {
|
|
60
56
|
"unused-imports": unusedImports,
|
|
61
|
-
"@typescript-eslint": ts,
|
|
62
57
|
}
|
|
63
58
|
};
|
|
64
59
|
|
package/configs/js.mjs
ADDED
package/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import baseConfig from "./configs/base.mjs";
|
|
2
|
+
import jsConfig from "./configs/js.mjs";
|
|
3
|
+
import tsConfig from "./configs/ts.mjs";
|
|
4
|
+
import reactConfig from "./configs/react.mjs";
|
|
5
|
+
|
|
6
|
+
// Export one big config (React/TS projects)
|
|
7
|
+
export default [
|
|
8
|
+
baseConfig,
|
|
9
|
+
jsConfig,
|
|
10
|
+
tsConfig,
|
|
11
|
+
reactConfig
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
// Export configs separately for finer control over linting rules
|
|
15
|
+
export { baseConfig, jsConfig, tsConfig, reactConfig };
|
package/package.json
CHANGED
package/configs/config-js.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import js from "@eslint/js";
|
|
2
|
-
import globals from "globals";
|
|
3
|
-
|
|
4
|
-
const jsConfig = {
|
|
5
|
-
files: ["**/*.{js,jsx,mjs,cjs}"],
|
|
6
|
-
languageOptions: {
|
|
7
|
-
globals: {
|
|
8
|
-
...globals.browser,
|
|
9
|
-
...globals.node,
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
rules: {
|
|
13
|
-
...js.configs.recommended.rules,
|
|
14
|
-
},
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default jsConfig;
|
package/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import baseConfig from "./configs/configs-base.mjs";
|
|
2
|
-
import jsConfig from "./configs/config-js.mjs";
|
|
3
|
-
import tsConfig from "./configs/config-ts.mjs";
|
|
4
|
-
import reactConfig from "./configs/config-react.mjs";
|
|
5
|
-
|
|
6
|
-
// Export one big config (React/TS projects)
|
|
7
|
-
export default [
|
|
8
|
-
baseConfig,
|
|
9
|
-
jsConfig,
|
|
10
|
-
tsConfig,
|
|
11
|
-
reactConfig
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
// Export configs separately for finer control over linting rules
|
|
15
|
-
export { baseConfig, jsConfig, tsConfig, reactConfig };
|
|
File without changes
|