@kouts/eslint-config 0.0.14 → 1.0.0
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/README.md +57 -19
- package/dist/index.cjs +528 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +523 -0
- package/dist/prettier.cjs +11 -0
- package/dist/prettier.d.cts +5 -0
- package/dist/prettier.d.ts +5 -0
- package/dist/prettier.js +9 -0
- package/package.json +68 -43
- package/base.js +0 -64
- package/configVars.js +0 -3
- package/index.js +0 -19
- package/javascript.js +0 -5
- package/nuxt3.js +0 -14
- package/prettier.config.js +0 -9
- package/vue.js +0 -8
- package/vue2.js +0 -6
- package/vue3-typescript.js +0 -27
- package/vue3.js +0 -9
package/package.json
CHANGED
|
@@ -1,67 +1,92 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kouts/eslint-config",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"packageManager": "pnpm@9.6.0",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
8
|
+
},
|
|
9
|
+
"author": "kouts",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/kouts/eslint-config/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/kouts/eslint-config#readme",
|
|
4
15
|
"description": "Kouts's ESLint config",
|
|
5
|
-
"
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./dist/index.d.cts",
|
|
20
|
+
"default": "./dist/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"default": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"./prettier": {
|
|
28
|
+
"require": {
|
|
29
|
+
"types": "./dist/prettier.d.cts",
|
|
30
|
+
"default": "./dist/prettier.cjs"
|
|
31
|
+
},
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/prettier.d.ts",
|
|
34
|
+
"default": "./dist/prettier.js"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"main": "./dist/index.js",
|
|
39
|
+
"module": "./dist/index.js",
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
6
41
|
"files": [
|
|
7
|
-
"
|
|
8
|
-
"base.js",
|
|
9
|
-
"javascript.js",
|
|
10
|
-
"vue.js",
|
|
11
|
-
"vue2.js",
|
|
12
|
-
"vue3.js",
|
|
13
|
-
"vue3-typescript.js",
|
|
14
|
-
"nuxt3.js",
|
|
15
|
-
"prettier.config.js",
|
|
16
|
-
"configVars.js"
|
|
42
|
+
"dist"
|
|
17
43
|
],
|
|
18
44
|
"scripts": {
|
|
45
|
+
"dev": "pkgroll --watch",
|
|
46
|
+
"build": "pkgroll --clean-dist",
|
|
47
|
+
"inspect": "npx @eslint/config-inspector --config eslint.config.ts",
|
|
19
48
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
20
|
-
"lint": "eslint
|
|
21
|
-
"lint-fix": "eslint --fix
|
|
22
|
-
"lint-debug": "eslint -c vue3-typescript.js --print-config \"**/*.js\" > ./eslint-debug.json"
|
|
49
|
+
"lint": "pnpm run build && eslint .",
|
|
50
|
+
"lint-fix": "pnpm run build && eslint --fix ."
|
|
23
51
|
},
|
|
24
52
|
"keywords": [
|
|
25
53
|
"lint",
|
|
26
54
|
"eslint",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
55
|
+
"eslint-plugin",
|
|
56
|
+
"eslint-config",
|
|
57
|
+
"eslint-flat-config",
|
|
58
|
+
"eslint-config-vue",
|
|
59
|
+
"eslint-config-standard",
|
|
60
|
+
"eslint-9-vue-config",
|
|
30
61
|
"vue",
|
|
31
|
-
"
|
|
62
|
+
"vue-2",
|
|
63
|
+
"vue-3",
|
|
64
|
+
"vue-prettier"
|
|
32
65
|
],
|
|
33
66
|
"repository": {
|
|
34
67
|
"type": "git",
|
|
35
68
|
"url": "git+https://github.com/kouts/eslint-config.git"
|
|
36
69
|
},
|
|
37
|
-
"author": "kouts",
|
|
38
|
-
"license": "MIT",
|
|
39
|
-
"bugs": {
|
|
40
|
-
"url": "https://github.com/kouts/eslint-config/issues"
|
|
41
|
-
},
|
|
42
|
-
"homepage": "https://github.com/kouts/eslint-config#readme",
|
|
43
70
|
"dependencies": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"eslint-
|
|
48
|
-
"eslint-
|
|
49
|
-
"eslint-plugin-
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
53
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
54
|
-
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
|
|
55
|
-
"eslint-plugin-vue": "^9.17.0",
|
|
56
|
-
"vue-eslint-parser": "^9.3.1"
|
|
71
|
+
"eslint-config-prettier": "^9.1.0",
|
|
72
|
+
"eslint-plugin-html": "^8.1.1",
|
|
73
|
+
"eslint-plugin-import-x": "^3.1.0",
|
|
74
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
75
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
76
|
+
"eslint-plugin-vue": "^9.27.0",
|
|
77
|
+
"neostandard": "^0.11.2",
|
|
78
|
+
"prettier": "^3.3.3"
|
|
57
79
|
},
|
|
58
80
|
"devDependencies": {
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
81
|
+
"@types/node": "^22.1.0",
|
|
82
|
+
"eslint": "^9.8.0",
|
|
83
|
+
"pkgroll": "^2.4.2",
|
|
84
|
+
"typescript": "^5.5.4"
|
|
62
85
|
},
|
|
63
86
|
"peerDependencies": {
|
|
64
|
-
"eslint": "^8.
|
|
65
|
-
|
|
87
|
+
"eslint": "^9.8.0"
|
|
88
|
+
},
|
|
89
|
+
"resolutions": {
|
|
90
|
+
"@typescript-eslint/utils": "^8.0.0"
|
|
66
91
|
}
|
|
67
92
|
}
|
package/base.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const configVars = require('./configVars.js')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
root: true,
|
|
5
|
-
env: {
|
|
6
|
-
node: true,
|
|
7
|
-
browser: true
|
|
8
|
-
},
|
|
9
|
-
extends: ['standard'],
|
|
10
|
-
plugins: ['html', 'sort-imports-es6-autofix'],
|
|
11
|
-
ignorePatterns: ['**/node_modules/**', '{tmp,temp}/**', '**/*.min.js', 'vendor/**', 'dist/**', 'public/**'],
|
|
12
|
-
overrides: [
|
|
13
|
-
{
|
|
14
|
-
files: ['*.json'],
|
|
15
|
-
rules: {
|
|
16
|
-
quotes: [2, 'double']
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
files: ['**/*.spec.{j,t}s?(x)'],
|
|
21
|
-
env: {
|
|
22
|
-
jest: true
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
rules: {
|
|
27
|
-
// Sort imports
|
|
28
|
-
'sort-imports-es6-autofix/sort-imports-es6': [
|
|
29
|
-
'error',
|
|
30
|
-
{
|
|
31
|
-
ignoreCase: false,
|
|
32
|
-
ignoreMemberSort: false,
|
|
33
|
-
memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none']
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
|
|
37
|
-
// Enforce a new line after the imports section
|
|
38
|
-
'import/newline-after-import': ['error', { count: 1 }],
|
|
39
|
-
|
|
40
|
-
// Enforce blank lines between the given 2 kinds of statements
|
|
41
|
-
'padding-line-between-statements': [
|
|
42
|
-
'error',
|
|
43
|
-
{ blankLine: 'always', prev: '*', next: 'return' },
|
|
44
|
-
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
|
|
45
|
-
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
|
|
46
|
-
{ blankLine: 'always', prev: 'directive', next: '*' },
|
|
47
|
-
{ blankLine: 'any', prev: 'directive', next: 'directive' }
|
|
48
|
-
],
|
|
49
|
-
|
|
50
|
-
// Console and debugger settings depending whether we're on production or not
|
|
51
|
-
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
52
|
-
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
53
|
-
|
|
54
|
-
// Print width setting
|
|
55
|
-
'max-len': [
|
|
56
|
-
'error',
|
|
57
|
-
{
|
|
58
|
-
code: configVars.printWidth,
|
|
59
|
-
ignoreComments: true,
|
|
60
|
-
ignoreUrls: true
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
}
|
package/configVars.js
DELETED
package/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const base = require('./base')
|
|
2
|
-
const javascript = require('./javascript')
|
|
3
|
-
const vue = require('./vue')
|
|
4
|
-
const vue2 = require('./vue2')
|
|
5
|
-
const vue3 = require('./vue3')
|
|
6
|
-
const vue3Typescript = require('./vue3')
|
|
7
|
-
const nuxt3 = require('./nuxt3')
|
|
8
|
-
|
|
9
|
-
module.exports = {
|
|
10
|
-
configs: {
|
|
11
|
-
base,
|
|
12
|
-
javascript,
|
|
13
|
-
vue,
|
|
14
|
-
vue2,
|
|
15
|
-
vue3,
|
|
16
|
-
'vue3-typescript': vue3Typescript,
|
|
17
|
-
nuxt3
|
|
18
|
-
}
|
|
19
|
-
}
|
package/javascript.js
DELETED
package/nuxt3.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const base = require.resolve('./base.js')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
extends: [base, '@nuxtjs/eslint-config-typescript', 'plugin:prettier/recommended'],
|
|
5
|
-
rules: {
|
|
6
|
-
// Conflicts with sort-imports-es6-autofix
|
|
7
|
-
'import/order': 'off',
|
|
8
|
-
|
|
9
|
-
/* Typescript */
|
|
10
|
-
|
|
11
|
-
// Prefer T[] instead of Array<T>
|
|
12
|
-
'@typescript-eslint/array-type': ['error', { default: 'array' }]
|
|
13
|
-
}
|
|
14
|
-
}
|
package/prettier.config.js
DELETED
package/vue.js
DELETED
package/vue2.js
DELETED
package/vue3-typescript.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const javascript = require.resolve('./javascript.js')
|
|
2
|
-
const vue = require.resolve('./vue.js')
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
env: {
|
|
6
|
-
'vue/setup-compiler-macros': true
|
|
7
|
-
},
|
|
8
|
-
extends: ['plugin:vue/vue3-recommended', '@vue/eslint-config-typescript/recommended', vue, javascript],
|
|
9
|
-
overrides: [
|
|
10
|
-
{
|
|
11
|
-
files: ['*.vue'],
|
|
12
|
-
parser: 'vue-eslint-parser',
|
|
13
|
-
parserOptions: {
|
|
14
|
-
parser: '@typescript-eslint/parser'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
rules: {
|
|
19
|
-
/* Typescript */
|
|
20
|
-
|
|
21
|
-
// Disable 'no-unused-vars' as TypeScript has its own version
|
|
22
|
-
'no-unused-vars': 'off',
|
|
23
|
-
|
|
24
|
-
// Prefer T[] instead of Array<T>
|
|
25
|
-
'@typescript-eslint/array-type': ['error', { default: 'array' }]
|
|
26
|
-
}
|
|
27
|
-
}
|