@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.
@@ -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
@@ -0,0 +1,10 @@
1
+ import js from "@eslint/js";
2
+
3
+ const jsConfig = {
4
+ files: ["**/*.{js,jsx,mjs,cjs}"],
5
+ rules: {
6
+ ...js.configs.recommended.rules,
7
+ },
8
+ }
9
+
10
+ export default jsConfig;
@@ -17,6 +17,8 @@ const tsConfig = {
17
17
  },
18
18
  },
19
19
  rules: {
20
+ ...ts.configs.recommended.rules,
21
+ ...ts.configs["eslint-recommended"].rules,
20
22
  // Typescript rules
21
23
  "@typescript-eslint/no-unused-vars": [
22
24
  "error",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castiron/eslint-config",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "General eslint configuration for Cast Iron Coding projects",
5
5
  "main": "index.mjs",
6
6
  "repository": {
@@ -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