@kasoa/eslint-config 0.0.10 → 0.0.12

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 +1 @@
1
- {"version":3,"file":"typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/typescript-eslint.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,kCAwBjC,CAAC"}
1
+ {"version":3,"file":"typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/typescript-eslint.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,kCAsClC,CAAC"}
@@ -1,27 +1,39 @@
1
1
  import { defineConfig } from "eslint/config";
2
+ import globals from "globals";
2
3
  import typescriptEslint from "typescript-eslint";
3
4
  export const typescriptEslintConfig = defineConfig({
4
- files: [
5
- "**/*.js",
6
- "**/*.jsx",
7
- "**/*.mjs",
8
- "**/*.cjs",
9
- "**/*.ts",
10
- "**/*.tsx",
11
- "**/*.mts",
12
- "**/*.cts",
5
+ files: ["**/*.{js,jsx,mjs,ts,tsx,mts}"],
6
+ extends: [
7
+ typescriptEslint.configs.strictTypeChecked,
8
+ typescriptEslint.configs.stylisticTypeChecked,
13
9
  ],
10
+ languageOptions: {
11
+ parserOptions: {
12
+ projectService: true,
13
+ },
14
+ },
15
+ rules: {
16
+ "@typescript-eslint/no-unused-vars": "off",
17
+ "@typescript-eslint/consistent-type-imports": "error",
18
+ },
19
+ }, {
20
+ files: ["**/*.{cjs,cts}"],
14
21
  extends: [
15
22
  typescriptEslint.configs.strictTypeChecked,
16
23
  typescriptEslint.configs.stylisticTypeChecked,
17
24
  ],
18
25
  languageOptions: {
26
+ sourceType: "commonjs",
19
27
  parserOptions: {
20
28
  projectService: true,
21
29
  },
30
+ globals: {
31
+ ...globals.node,
32
+ },
22
33
  },
23
34
  rules: {
24
35
  "@typescript-eslint/no-unused-vars": "off",
25
36
  "@typescript-eslint/consistent-type-imports": "error",
37
+ "@typescript-eslint/no-require-imports": "off",
26
38
  },
27
39
  });
@@ -1 +1 @@
1
- {"version":3,"file":"eslint-react.d.ts","sourceRoot":"","sources":["../../src/react/eslint-react.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,kCAQ7B,CAAC"}
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(eslintReact.configs["strict-type-checked"], {
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,kCAA2C,CAAC"}
1
+ {"version":3,"file":"jsx-a11y.d.ts","sourceRoot":"","sources":["../../src/react/jsx-a11y.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,kCAGxB,CAAC"}
@@ -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(jsxA11y.flatConfigs.strict);
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,kCAE/B,CAAC"}
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(reactCompiler.configs.recommended);
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,kCAE5B,CAAC"}
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(reactHooks.configs.flat["recommended-latest"]);
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,kCAE9B,CAAC"}
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(reactRefresh.configs.recommended);
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,kCAE9C,CAAC"}
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(reactYouMightNotNeedAnEffect.configs.recommended);
3
+ export const reactYouMightNotNeedAnEffectConfig = defineConfig({
4
+ files: ["**/*.{js,jsx,ts,tsx}"],
5
+ extends: [reactYouMightNotNeedAnEffect.configs.recommended],
6
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kasoa/eslint-config",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Kasoa's ESLint config",
@@ -1,28 +1,43 @@
1
1
  import { defineConfig } from "eslint/config";
2
+ import globals from "globals";
2
3
  import typescriptEslint from "typescript-eslint";
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
- ],
15
- extends: [
16
- typescriptEslint.configs.strictTypeChecked,
17
- typescriptEslint.configs.stylisticTypeChecked,
18
- ],
19
- languageOptions: {
20
- parserOptions: {
21
- projectService: true,
5
+ export const typescriptEslintConfig = defineConfig(
6
+ {
7
+ files: ["**/*.{js,jsx,mjs,ts,tsx,mts}"],
8
+ extends: [
9
+ typescriptEslint.configs.strictTypeChecked,
10
+ typescriptEslint.configs.stylisticTypeChecked,
11
+ ],
12
+ languageOptions: {
13
+ parserOptions: {
14
+ projectService: true,
15
+ },
16
+ },
17
+ rules: {
18
+ "@typescript-eslint/no-unused-vars": "off",
19
+ "@typescript-eslint/consistent-type-imports": "error",
22
20
  },
23
21
  },
24
- rules: {
25
- "@typescript-eslint/no-unused-vars": "off",
26
- "@typescript-eslint/consistent-type-imports": "error",
22
+ {
23
+ files: ["**/*.{cjs,cts}"],
24
+ extends: [
25
+ typescriptEslint.configs.strictTypeChecked,
26
+ typescriptEslint.configs.stylisticTypeChecked,
27
+ ],
28
+ languageOptions: {
29
+ sourceType: "commonjs",
30
+ parserOptions: {
31
+ projectService: true,
32
+ },
33
+ globals: {
34
+ ...globals.node,
35
+ },
36
+ },
37
+ rules: {
38
+ "@typescript-eslint/no-unused-vars": "off",
39
+ "@typescript-eslint/consistent-type-imports": "error",
40
+ "@typescript-eslint/no-require-imports": "off",
41
+ },
27
42
  },
28
- });
43
+ );
@@ -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
- eslintReact.configs["strict-type-checked"],
6
- {
7
- rules: {
8
- "@eslint-react/prefer-namespace-import": "error",
9
- "@eslint-react/no-unstable-context-value": "off",
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
+ });
@@ -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(jsxA11y.flatConfigs.strict);
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
- reactCompiler.configs.recommended,
6
- );
4
+ export const reactCompilerConfig = defineConfig({
5
+ files: ["**/*.{js,jsx,ts,tsx}"],
6
+ extends: [reactCompiler.configs.recommended],
7
+ });
@@ -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
- reactHooks.configs.flat["recommended-latest"],
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
- reactRefresh.configs.recommended,
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
- reactYouMightNotNeedAnEffect.configs.recommended,
6
- );
4
+ export const reactYouMightNotNeedAnEffectConfig = defineConfig({
5
+ files: ["**/*.{js,jsx,ts,tsx}"],
6
+ extends: [reactYouMightNotNeedAnEffect.configs.recommended],
7
+ });