@cenk1cenk2/eslint-config 3.0.0 → 3.0.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [3.0.2](https://gitlab.kilic.dev/config/eslint-config/compare/v3.0.1...v3.0.2) (2024-10-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update ([adf80ab](https://gitlab.kilic.dev/config/eslint-config/commit/adf80ab05309b1ae1c129fd5e63aeca2bd0b1380))
7
+
8
+ ## [3.0.1](https://gitlab.kilic.dev/config/eslint-config/compare/v3.0.0...v3.0.1) (2024-10-18)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update configuration ([9aabf20](https://gitlab.kilic.dev/config/eslint-config/commit/9aabf2067ada855430472e9ebeb475276db3ed24))
14
+
1
15
  # [3.0.0](https://gitlab.kilic.dev/config/eslint-config/compare/v2.7.60...v3.0.0) (2024-10-18)
2
16
 
3
17
 
package/base.js CHANGED
@@ -2,12 +2,14 @@ import js from '@eslint/js'
2
2
  import StylisticPlugin from '@stylistic/eslint-plugin'
3
3
 
4
4
  import imports from './import.js'
5
+ import { EXTENSIONS } from './constants.js'
5
6
 
6
7
  /** @type {import("eslint").Linter.Config[]} */
7
8
  export default [
8
9
  js.configs.recommended,
9
10
  ...imports,
10
11
  {
12
+ files: [...EXTENSIONS],
11
13
  languageOptions: {
12
14
  globals: {
13
15
  browser: true,
package/constants.js ADDED
@@ -0,0 +1 @@
1
+ export const EXTENSIONS = ['**/*.js', '**/*.mjs', '**/*.cjs', '**/*.ts', '**/*.mts', '**/*.cts', '**/*.jsx', '**/*.tsx', '**/*.vue', '**/*.svelte']
package/import-strict.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import ImportPlugin from 'eslint-plugin-import'
2
+ import { EXTENSIONS } from './constants.js'
2
3
 
3
4
  /** @type {import("eslint").Linter.Config[]} */
4
5
  export default [
5
6
  {
7
+ files: [...EXTENSIONS],
6
8
  plugins: {
7
9
  import: ImportPlugin
8
10
  },
package/import.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import ImportPlugin from 'eslint-plugin-import'
2
+ import { EXTENSIONS } from './constants.js'
2
3
 
3
4
  /** @type {import("eslint").Linter.Config[]} */
4
5
  export default [
5
6
  {
7
+ files: [...EXTENSIONS],
6
8
  plugins: { import: ImportPlugin },
7
9
  rules: {
8
10
  'sort-imports': 'off',
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@cenk1cenk2/eslint-config",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "Eslint configuration for my taste.",
5
5
  "main": "index.js",
6
6
  "repository": "git@gitlab.kilic.dev:config/eslint-config.git",
7
7
  "author": "Cenk Kilic",
8
8
  "license": "MIT",
9
9
  "type": "module",
10
+ "exports": {
11
+ ".": "./base.js",
12
+ "./*": "./*.js"
13
+ },
10
14
  "scripts": {
11
15
  "format": "prettier --log-level warn --write ./*.js && eslint --fix",
12
16
  "lint": "eslint",
@@ -6,7 +6,7 @@ export default [
6
6
  ...typescript,
7
7
  ...react,
8
8
  {
9
- files: ['*.tsx'],
9
+ files: ['**/*.tsx'],
10
10
  plugins: ['react', 'react-hooks'],
11
11
  rules: {
12
12
  '@typescript-eslint/no-unused-vars': 'off',
package/react.js CHANGED
@@ -4,7 +4,7 @@ import base from './base.js'
4
4
  export default [
5
5
  ...base,
6
6
  {
7
- files: ['*.jsx', '*.tsx'],
7
+ files: ['**/*.jsx', '**/*.tsx'],
8
8
  plugins: ['react', 'react-hooks'],
9
9
  languageOptions: {
10
10
  parserOptions: {
@@ -7,16 +7,14 @@ export default [
7
7
  ...svelte.configs['flat/recommended'],
8
8
  ...typescript,
9
9
  {
10
+ files: ['**/*.svelte'],
10
11
  languageOptions: {
12
+ parser: 'svelte-eslint-parser',
11
13
  parserOptions: {
14
+ parser: '@typescript-eslint/parser',
12
15
  extraFileExtensions: ['.svelte']
13
16
  }
14
17
  },
15
- files: ['*.svelte'],
16
- parser: 'svelte-eslint-parser',
17
- parserOptions: {
18
- parser: '@typescript-eslint/parser'
19
- },
20
18
  rules: {
21
19
  'max-len': 'off',
22
20
  'no-throw-literal': 'off',
@@ -4,7 +4,7 @@ import typescript from './typescript.js'
4
4
  export default [
5
5
  ...typescript,
6
6
  {
7
- files: ['*.ts', '*.tsx'],
7
+ files: ['**/*.ts', '**/*.mjs', '**/*.cjs', '**/*.tsx', '**/*.svelte', '**/*.vue'],
8
8
  languageOptions: {
9
9
  parserOptions: {
10
10
  project: 'tsconfig.json'
package/typescript.js CHANGED
@@ -7,9 +7,9 @@ import base from './base.js'
7
7
  export default [
8
8
  ...base,
9
9
  {
10
- files: ['*.ts', '*.tsx'],
10
+ files: ['**/*.ts', '**/*.mjs', '**/*.cjs', '**/*.tsx', '**/*.svelte', '**/*.vue'],
11
11
  plugins: {
12
- 'stylestic': StylisticPlugin,
12
+ stylestic: StylisticPlugin,
13
13
  '@typescript-eslint': TypescriptEslintPlugin
14
14
  },
15
15
  extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended'],
package/utils.js CHANGED
@@ -73,7 +73,7 @@ export function generateImportGroups(options) {
73
73
  * @param {{ paths?: string[], tsconfig?: string, tsconfigDir?: string}} options
74
74
  * @returns {import("eslint").Linter.Config[]}
75
75
  */
76
- export function generateImportGroupsWithOverride(options) {
76
+ export function importGroupConfig(options) {
77
77
  return [
78
78
  {
79
79
  plugins: {
package/vue-typescript.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /** @type {import("eslint").Linter.Config[]} */
2
2
  export default [
3
3
  {
4
- files: ['*.vue'],
4
+ files: ['**/*.vue'],
5
5
  extends: ['./index', '@nuxtjs/eslint-config-typescript/index'],
6
6
  rules: {}
7
7
  }
package/vue.js CHANGED
@@ -4,7 +4,7 @@ import base from './base.js'
4
4
  export default [
5
5
  ...base,
6
6
  {
7
- files: ['*.vue'],
7
+ files: ['**/*.vue'],
8
8
  extends: ['@nuxtjs'],
9
9
  rules: {
10
10
  'vue/singleline-html-element-content-newline': 0,