@st1ggy/linter-config 1.0.76 → 1.0.78

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.76",
3
+ "version": "1.0.78",
4
4
  "description": "ESLint, Stylelint and Prettier configs for React, Vue [WIP] and Svelte [WIP]",
5
5
  "private": false,
6
6
  "repository": {
@@ -49,8 +49,13 @@
49
49
  "./eslint-react": "./src/eslint/eslint.config.react.js",
50
50
  "./eslint-typescript": "./src/eslint/eslint.config.typescript.js",
51
51
  "./eslint-common": "./src/eslint/eslint.config.common.js",
52
+ "./eslint-svelte": "./src/eslint/eslint.config.svelte.js",
52
53
  "./prettier-common": "./src/prettier/prettier.config.common.js",
53
54
  "./stylelint-common": "./src/stylelint/stylelint.config.common.js",
54
55
  "./stylelint-scss": "./src/stylelint/stylelint.config.scss.js"
56
+ },
57
+ "dependencies": {
58
+ "eslint-plugin-svelte": "^2.46.0",
59
+ "svelte-eslint-parser": "^0.43.0"
55
60
  }
56
61
  }
@@ -1,8 +1,10 @@
1
1
  import eslint from '@eslint/js'
2
2
  import tseslint from 'typescript-eslint'
3
3
 
4
+ import extensions from './extensions'
5
+
4
6
  export default tseslint.config({
5
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
+ ...extensions,
6
8
  extends: [eslint.configs.recommended],
7
9
  rules: {
8
10
  'no-console': 'warn',
@@ -1,8 +1,10 @@
1
1
  import importPlugin from 'eslint-plugin-import'
2
2
  import tseslint from 'typescript-eslint'
3
3
 
4
+ import extensions from './extensions'
5
+
4
6
  export default tseslint.config({
5
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
+ ...extensions,
6
8
  plugins: { import: importPlugin },
7
9
  rules: {
8
10
  'import/newline-after-import': 'error',
@@ -1,8 +1,10 @@
1
1
  import nextPlugin from '@next/eslint-plugin-next'
2
2
  import tseslint from 'typescript-eslint'
3
3
 
4
+ import extensions from './extensions'
5
+
4
6
  export default tseslint.config({
5
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
+ ...extensions,
6
8
  plugins: {
7
9
  '@next/next': nextPlugin,
8
10
  },
@@ -2,8 +2,10 @@ import prettierConfig from 'eslint-config-prettier'
2
2
  import prettierPlugin from 'eslint-plugin-prettier'
3
3
  import tseslint from 'typescript-eslint'
4
4
 
5
+ import extensions from './extensions'
6
+
5
7
  export default tseslint.config({
6
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
8
+ ...extensions,
7
9
  extends: [prettierConfig],
8
10
  plugins: { prettier: prettierPlugin },
9
11
  rules: { 'prettier/prettier': 'error' },
@@ -3,8 +3,10 @@ import reactRecommended from 'eslint-plugin-react/configs/recommended.js'
3
3
  import reactHooksPlugin from 'eslint-plugin-react-hooks'
4
4
  import tseslint from 'typescript-eslint'
5
5
 
6
+ import extensions from './extensions'
7
+
6
8
  export default tseslint.config({
7
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
9
+ ...extensions,
8
10
  plugins: { 'react-hooks': reactHooksPlugin },
9
11
  extends: [reactRecommended, reactJsxRuntime],
10
12
  rules: {
@@ -1,7 +1,9 @@
1
1
  import sonarjs from 'eslint-plugin-sonarjs'
2
2
  import tseslint from 'typescript-eslint'
3
3
 
4
+ import extensions from './extensions'
5
+
4
6
  export default tseslint.config({
5
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
+ ...extensions,
6
8
  extends: [sonarjs.configs.recommended],
7
9
  })
@@ -0,0 +1,17 @@
1
+ import sveltePlugin from 'eslint-plugin-svelte'
2
+ import svelteParser from 'svelte-eslint-parser'
3
+ import tseslint from 'typescript-eslint'
4
+
5
+ export default tseslint.config({
6
+ files: ['**/*.svelte', '*.svelte'],
7
+ extends: [...sveltePlugin.configs['flat/recommended']],
8
+ languageOptions: {
9
+ parser: svelteParser,
10
+ parserOptions: {
11
+ parser: {
12
+ ts: '@typescript-eslint/parser',
13
+ },
14
+ extraFileExtensions: ['.svelte'],
15
+ },
16
+ },
17
+ })
@@ -1,7 +1,9 @@
1
1
  import tseslint from 'typescript-eslint'
2
2
 
3
+ import extensions from './extensions'
4
+
3
5
  export default tseslint.config({
4
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
6
+ ...extensions,
5
7
  extends: [...tseslint.configs.recommended, ...tseslint.configs.stylistic],
6
8
  languageOptions: {
7
9
  parserOptions: {
@@ -1,8 +1,10 @@
1
1
  import unicornPlugin from 'eslint-plugin-unicorn'
2
2
  import tseslint from 'typescript-eslint'
3
3
 
4
+ import extensions from './extensions'
5
+
4
6
  export default tseslint.config({
5
- files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
7
+ ...extensions,
6
8
  extends: [unicornPlugin.configs['flat/recommended']],
7
9
  rules: {
8
10
  'unicorn/consistent-destructuring': 'error',
@@ -0,0 +1,3 @@
1
+ export default {
2
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '**/*.vue', '**/*.svelte'],
3
+ }
@@ -0,0 +1,4 @@
1
+ import svelteConfig from './configs/config.svelte.js'
2
+ import typescriptConfig from './eslint.config.typescript.js'
3
+
4
+ export default [...typescriptConfig, ...svelteConfig]
package/bun.lockb DELETED
Binary file