@cenk1cenk2/eslint-config 3.0.1 → 3.0.3
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 +14 -0
- package/base.js +2 -0
- package/constants.js +1 -0
- package/import-strict.js +2 -0
- package/import.js +2 -0
- package/index.js +16 -0
- package/package.json +4 -4
- package/react-typescript.js +1 -1
- package/react.js +1 -1
- package/svelte-typescript.js +3 -5
- package/typescript-dynamic.js +1 -1
- package/typescript.js +4 -4
- package/utils.js +1 -1
- package/vue-typescript.js +1 -1
- package/vue.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [3.0.3](https://gitlab.kilic.dev/config/eslint-config/compare/v3.0.2...v3.0.3) (2024-10-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update configuratipn ([d5c8d5d](https://gitlab.kilic.dev/config/eslint-config/commit/d5c8d5de557bf6584701ad9e4c3a48cd6e655e68))
|
|
7
|
+
|
|
8
|
+
## [3.0.2](https://gitlab.kilic.dev/config/eslint-config/compare/v3.0.1...v3.0.2) (2024-10-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* update ([adf80ab](https://gitlab.kilic.dev/config/eslint-config/commit/adf80ab05309b1ae1c129fd5e63aeca2bd0b1380))
|
|
14
|
+
|
|
1
15
|
## [3.0.1](https://gitlab.kilic.dev/config/eslint-config/compare/v3.0.0...v3.0.1) (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
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/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import ConfigBase from './base.js'
|
|
2
|
+
import ConfigImport from './import.js'
|
|
3
|
+
import ConfigImportStrict from './import-strict.js'
|
|
4
|
+
import ConfigTypescript from './typescript.js'
|
|
5
|
+
import ConfigTypescriptDynamic from './typescript-dynamic.js'
|
|
6
|
+
import * as utils from './utils.js'
|
|
7
|
+
|
|
8
|
+
export const configs = {
|
|
9
|
+
['js']: ConfigBase,
|
|
10
|
+
['import']: ConfigImport,
|
|
11
|
+
['import-strict']: ConfigImportStrict,
|
|
12
|
+
['typescript']: ConfigTypescript,
|
|
13
|
+
['typescript-dynamic']: ConfigTypescriptDynamic
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { utils }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cenk1cenk2/eslint-config",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Eslint configuration for my taste.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "git@gitlab.kilic.dev:config/eslint-config.git",
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"exports": {
|
|
11
|
-
".": "./
|
|
12
|
-
"./*": "./*.js"
|
|
11
|
+
".": "./index.js"
|
|
13
12
|
},
|
|
14
13
|
"scripts": {
|
|
15
14
|
"format": "prettier --log-level warn --write ./*.js && eslint --fix",
|
|
@@ -64,7 +63,8 @@
|
|
|
64
63
|
"@typescript-eslint/eslint-plugin": "^8.10.0",
|
|
65
64
|
"@typescript-eslint/parser": "^8.10.0",
|
|
66
65
|
"eslint-plugin-import": "^2.31.0",
|
|
67
|
-
"load-tsconfig": "^0.2.5"
|
|
66
|
+
"load-tsconfig": "^0.2.5",
|
|
67
|
+
"typescript-eslint": "^8.10.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@cenk1cenk2/cz-cc": "^1.7.11",
|
package/react-typescript.js
CHANGED
package/react.js
CHANGED
package/svelte-typescript.js
CHANGED
|
@@ -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',
|
package/typescript-dynamic.js
CHANGED
package/typescript.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import StylisticPlugin from '@stylistic/eslint-plugin'
|
|
2
2
|
import TypescriptEslintPlugin from '@typescript-eslint/eslint-plugin'
|
|
3
|
-
|
|
3
|
+
import TypescriptEslint from 'typescript-eslint'
|
|
4
4
|
import base from './base.js'
|
|
5
5
|
|
|
6
6
|
/** @type {import("eslint").Linter.Config[]} */
|
|
7
7
|
export default [
|
|
8
8
|
...base,
|
|
9
|
+
TypescriptEslint.configs.recommended,
|
|
9
10
|
{
|
|
10
|
-
files: ['
|
|
11
|
+
files: ['**/*.ts', '**/*.mjs', '**/*.cjs', '**/*.tsx', '**/*.svelte', '**/*.vue'],
|
|
11
12
|
plugins: {
|
|
12
|
-
|
|
13
|
+
stylestic: StylisticPlugin,
|
|
13
14
|
'@typescript-eslint': TypescriptEslintPlugin
|
|
14
15
|
},
|
|
15
|
-
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended'],
|
|
16
16
|
parserOptions: {},
|
|
17
17
|
rules: {
|
|
18
18
|
// this is a bit buggy at the moment
|
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
|
|
76
|
+
export function importGroupConfig(options) {
|
|
77
77
|
return [
|
|
78
78
|
{
|
|
79
79
|
plugins: {
|
package/vue-typescript.js
CHANGED