@st1ggy/linter-config 1.0.67 → 1.0.68

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@st1ggy/linter-config",
3
- "version": "1.0.67",
3
+ "version": "1.0.68",
4
4
  "description": "ESLint, Stylelint and Prettier configs for React, Vue [WIP] and Svelte [WIP]",
5
5
  "private": false,
6
6
  "main": "index.js",
@@ -1,7 +1,7 @@
1
- import commonRules from './rules/rules.common.js'
2
- import importRules from './rules/rules.import.js'
3
- import prettierRules from './rules/rules.prettier.js'
4
- import sonarjsRules from './rules/rules.sonarjs.js'
5
- import unicornRules from './rules/rules.unicorn.js'
1
+ import commonConfig from './rules/rules.common.js'
2
+ import importConfig from './rules/rules.import.js'
3
+ import prettierConfig from './rules/rules.prettier.js'
4
+ import sonarjsConfig from './rules/rules.sonarjs.js'
5
+ import unicornConfig from './rules/rules.unicorn.js'
6
6
 
7
- export default [...prettierRules, ...commonRules, ...importRules, ...unicornRules, ...sonarjsRules]
7
+ export default [...prettierConfig, ...commonConfig, ...importConfig, ...unicornConfig, ...sonarjsConfig]
@@ -1,17 +1,4 @@
1
- import nextPlugin from '@next/eslint-plugin-next'
1
+ import nextConfig from './eslint.config.next.js'
2
+ import reactConfig from './eslint.config.react.js'
2
3
 
3
- import react from './eslint.config.react.js'
4
-
5
- export default [
6
- ...react,
7
- {
8
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
9
- plugins: {
10
- '@next/next': nextPlugin,
11
- },
12
- rules: {
13
- ...nextPlugin.configs.recommended.rules,
14
- ...nextPlugin.configs['core-web-vitals'].rules,
15
- },
16
- },
17
- ]
4
+ export default [...reactConfig, ...nextConfig]
@@ -1,4 +1,4 @@
1
- import typescript from './eslint.config.typescript.js'
2
- import reactRules from './rules/rules.react.js'
1
+ import typescriptConfig from './eslint.config.typescript.js'
2
+ import reactConfig from './rules/rules.react.js'
3
3
 
4
- export default [...typescript, ...reactRules]
4
+ export default [...typescriptConfig, ...reactConfig]
@@ -1,11 +1,11 @@
1
1
  import tseslint from 'typescript-eslint'
2
2
 
3
- import common from './eslint.config.common.js'
4
- import typescriptRules from './rules/rules.typescript.js'
3
+ import commonConfig from './eslint.config.common.js'
4
+ import typescriptConfig from './rules/rules.typescript.js'
5
5
 
6
6
  export default tseslint.config(
7
- ...common,
7
+ ...commonConfig,
8
8
  ...tseslint.configs.recommended,
9
9
  ...tseslint.configs.stylistic,
10
- ...typescriptRules,
10
+ ...typescriptConfig,
11
11
  )
@@ -1,7 +1,11 @@
1
1
  import eslint from '@eslint/js'
2
+ import tseslint from 'typescript-eslint'
2
3
 
3
- export default [
4
- eslint.configs.recommended,
4
+ export default tseslint.config(
5
+ {
6
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
+ extends: eslint.configs.recommended,
8
+ },
5
9
  {
6
10
  files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
11
  rules: {
@@ -85,4 +89,4 @@ export default [
85
89
  ],
86
90
  },
87
91
  },
88
- ]
92
+ )
@@ -0,0 +1,14 @@
1
+ import nextPlugin from '@next/eslint-plugin-next'
2
+
3
+ export default [
4
+ {
5
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
6
+ plugins: {
7
+ '@next/next': nextPlugin,
8
+ },
9
+ rules: {
10
+ ...nextPlugin.configs.recommended.rules,
11
+ ...nextPlugin.configs['core-web-vitals'].rules,
12
+ },
13
+ },
14
+ ]
@@ -1,11 +1,15 @@
1
1
  import prettierConfig from 'eslint-config-prettier'
2
2
  import prettierPlugin from 'eslint-plugin-prettier'
3
+ import tseslint from 'typescript-eslint'
3
4
 
4
- export default [
5
- prettierConfig,
5
+ export default tseslint.config(
6
+ {
7
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
8
+ extends: prettierConfig,
9
+ },
6
10
  {
7
11
  files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
8
12
  plugins: { prettier: prettierPlugin },
9
13
  rules: { 'prettier/prettier': 'error' },
10
14
  },
11
- ]
15
+ )
@@ -1,10 +1,17 @@
1
1
  import reactJsxRuntime from 'eslint-plugin-react/configs/jsx-runtime.js'
2
2
  import reactRecommended from 'eslint-plugin-react/configs/recommended.js'
3
3
  import reactHooksPlugin from 'eslint-plugin-react-hooks'
4
+ import tseslint from 'typescript-eslint'
4
5
 
5
- export default [
6
- reactRecommended,
7
- reactJsxRuntime,
6
+ export default tseslint.config(
7
+ {
8
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
9
+ extends: reactRecommended,
10
+ },
11
+ {
12
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
13
+ extends: reactJsxRuntime,
14
+ },
8
15
  {
9
16
  files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
10
17
  plugins: { 'react-hooks': reactHooksPlugin },
@@ -50,4 +57,4 @@ export default [
50
57
  ...reactHooksPlugin.configs.recommended.rules,
51
58
  },
52
59
  },
53
- ]
60
+ )
@@ -1,3 +1,7 @@
1
1
  import sonarjs from 'eslint-plugin-sonarjs'
2
+ import tseslint from 'typescript-eslint'
2
3
 
3
- export default [sonarjs.configs.recommended]
4
+ export default tseslint.config({
5
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
6
+ extends: sonarjs.configs.recommended,
7
+ })
@@ -1,7 +1,11 @@
1
1
  import unicornPlugin from 'eslint-plugin-unicorn'
2
+ import tseslint from 'typescript-eslint'
2
3
 
3
- export default [
4
- unicornPlugin.configs['flat/recommended'],
4
+ export default tseslint.config(
5
+ {
6
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
+ extends: unicornPlugin.configs['flat/recommended'],
8
+ },
5
9
  {
6
10
  files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
11
  rules: {
@@ -23,4 +27,4 @@ export default [
23
27
  ],
24
28
  },
25
29
  },
26
- ]
30
+ )