@ivuorinen/eslint-config 0.5.7 → 0.5.9
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 +1 -1
- package/index.cjs +23 -9
- package/jest.cjs +2 -0
- package/package.json +8 -8
- package/scripts/postinstall.cjs +5 -4
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ npm install @ivuorinen/eslint-config --save-dev
|
|
|
26
26
|
yarn add @ivuorinen/eslint-config --dev
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
After installing it, a _
|
|
29
|
+
After installing it, a _`eslint.config.mjs`_ file will be created automatically in the project's root folder with the following configuration:
|
|
30
30
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
package/index.cjs
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
1
3
|
const globals = require('globals')
|
|
4
|
+
const configEslint = require('eslint-config-eslint')
|
|
5
|
+
const configPrettier = require('eslint-config-prettier')
|
|
6
|
+
const pluginImport = require('eslint-plugin-import')
|
|
2
7
|
const pluginJs = require('@eslint/js')
|
|
3
|
-
const standard = require('eslint-config-standard')
|
|
4
8
|
const pluginN = require('eslint-plugin-n')
|
|
5
9
|
const pluginPromise = require('eslint-plugin-promise')
|
|
6
|
-
const pluginImport = require('eslint-plugin-import')
|
|
7
|
-
const pluginPrettier = require('eslint-plugin-prettier')
|
|
8
|
-
const pluginSonarJS = require('eslint-plugin-sonarjs')
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* @type { import("eslint").Linter.Config[] } config eslint configuration.
|
|
12
13
|
*/
|
|
13
14
|
module.exports = [
|
|
15
|
+
...configEslint,
|
|
16
|
+
{
|
|
17
|
+
linterOptions: {
|
|
18
|
+
reportUnusedDisableDirectives: 'warn'
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
'func-style': [
|
|
22
|
+
'error',
|
|
23
|
+
'declaration',
|
|
24
|
+
{
|
|
25
|
+
allowArrowFunctions: true
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
14
30
|
{
|
|
15
31
|
files: ['**/*.{js,mjs,cjs}'],
|
|
16
32
|
languageOptions: {
|
|
@@ -30,12 +46,10 @@ module.exports = [
|
|
|
30
46
|
plugins: {
|
|
31
47
|
n: pluginN,
|
|
32
48
|
import: pluginImport,
|
|
33
|
-
promise: pluginPromise
|
|
34
|
-
|
|
35
|
-
sonarjs: pluginSonarJS
|
|
36
|
-
},
|
|
37
|
-
rules: standard.rules
|
|
49
|
+
promise: pluginPromise
|
|
50
|
+
}
|
|
38
51
|
},
|
|
52
|
+
configPrettier,
|
|
39
53
|
{
|
|
40
54
|
ignores: ['coverage/', 'dist/', 'lib/', 'node_modules/']
|
|
41
55
|
}
|
package/jest.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ivuorinen/eslint-config",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.9",
|
|
4
4
|
"description": "ivuorinen's shareable configuration for ESLint.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ismo Vuorinen",
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@eslint/js": "^9",
|
|
55
|
-
"@ivuorinen/config-checker": "^1.1.
|
|
56
|
-
"eslint": "^9",
|
|
57
|
-
"eslint-config-
|
|
58
|
-
"eslint-config-
|
|
55
|
+
"@ivuorinen/config-checker": "^1.1.10",
|
|
56
|
+
"eslint": "^9.15.0",
|
|
57
|
+
"eslint-config-eslint": "^11",
|
|
58
|
+
"eslint-config-prettier": "^10.0.0",
|
|
59
59
|
"eslint-plugin-import": "^2",
|
|
60
60
|
"eslint-plugin-jest": "^28",
|
|
61
61
|
"eslint-plugin-n": "^17",
|
|
62
62
|
"eslint-plugin-promise": "^7",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
63
|
+
"globals": "^15",
|
|
64
|
+
"typescript": ">=4.2.0"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "a5d17169d1904bd26ccbb3aef5e98092d2aa2b13"
|
|
67
67
|
}
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
3
|
+
/* eslint no-console: "off", n/no-process-exit: "off" -- CLI app that gives users feedback */
|
|
4
|
+
|
|
5
|
+
const fs = require('node:fs')
|
|
6
|
+
const path = require('node:path')
|
|
7
|
+
const process = require('node:process')
|
|
7
8
|
const checkConfig = require('@ivuorinen/config-checker')
|
|
8
9
|
const foundConfig = checkConfig('eslint')
|
|
9
10
|
|