node-editorconfig 1.4.0 → 1.5.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/.nvmrc +1 -1
- package/README.md +2 -2
- package/eslint.config.cjs +39 -0
- package/package.json +6 -4
- package/.eslintrc +0 -29
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ $ npx node-editorconfig
|
|
|
16
16
|
$ npm install --global node-editorconfig
|
|
17
17
|
$ cd /path/to/project/
|
|
18
18
|
$ node-editorconfig
|
|
19
|
-
|
|
19
|
+
✔ .editorconfig file added at /path/to/project/.editorconfig
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Parameters
|
|
@@ -24,7 +24,7 @@ $ node-editorconfig
|
|
|
24
24
|
`--overwrite` (To overwrite the .editorconfig file, if it already exists)
|
|
25
25
|
```sh
|
|
26
26
|
$ npx node-editorconfig --overwrite
|
|
27
|
-
|
|
27
|
+
✔ .editorconfig file overwritten at /path/to/project/.editorconfig
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const globals = require('globals');
|
|
2
|
+
const js = require('@eslint/js');
|
|
3
|
+
|
|
4
|
+
module.exports = [
|
|
5
|
+
{
|
|
6
|
+
// https://eslint.org/docs/latest/use/configure/ignore
|
|
7
|
+
ignores: [
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
js.configs.recommended,
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
files: [
|
|
15
|
+
'**/*.js',
|
|
16
|
+
'**/*.cjs',
|
|
17
|
+
'**/*.cts',
|
|
18
|
+
'**/*.mjs',
|
|
19
|
+
'**/*.mts',
|
|
20
|
+
'**/*.ts'
|
|
21
|
+
],
|
|
22
|
+
languageOptions: {
|
|
23
|
+
ecmaVersion: 'latest',
|
|
24
|
+
sourceType: 'module',
|
|
25
|
+
globals: {
|
|
26
|
+
// Node.js environment globals
|
|
27
|
+
...globals.node
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
rules: {
|
|
32
|
+
'indent': ['error', 4, {'SwitchCase': 1}],
|
|
33
|
+
'linebreak-style': ['error', 'unix'],
|
|
34
|
+
'no-var': 'error',
|
|
35
|
+
'prefer-const': 'error',
|
|
36
|
+
'semi': ['error', 'always']
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
];
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-editorconfig",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "A generic .editorconfig for Node JS projects. $ npm i -g node-editorconfig ; node-editorconfig",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": ">=
|
|
6
|
+
"node": ">=22.12.0"
|
|
7
7
|
},
|
|
8
8
|
"bin": {
|
|
9
9
|
"node-editorconfig": "./copy-editorconfig-to-cwd.js"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
-
"lint": "eslint .",
|
|
12
|
+
"lint": "eslint . --report-unused-disable-directives",
|
|
13
13
|
"test": "npm run lint"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
"cp-file": "=9.1.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"eslint": "
|
|
23
|
+
"eslint": "^9.39.1",
|
|
24
|
+
"@eslint/js": "^9.39.1",
|
|
25
|
+
"globals": "^16.5.0"
|
|
24
26
|
},
|
|
25
27
|
"keywords": [
|
|
26
28
|
"generic",
|
package/.eslintrc
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// http://eslint.org/docs/user-guide/configuring.html
|
|
3
|
-
// https://gist.github.com/cletusw/e01a85e399ab563b1236
|
|
4
|
-
"parserOptions": {
|
|
5
|
-
"sourceType": "module", // https://github.com/AtomLinter/linter-eslint/issues/462#issuecomment-190770417
|
|
6
|
-
"ecmaVersion": 8,
|
|
7
|
-
"ecmaFeatures": { // http://eslint.org/docs/user-guide/migrating-to-2.0.0#language-options
|
|
8
|
-
"jsx": true
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"env": {
|
|
12
|
-
"browser": false,
|
|
13
|
-
"es6": true,
|
|
14
|
-
"node": true
|
|
15
|
-
},
|
|
16
|
-
"extends": "eslint:recommended",
|
|
17
|
-
"plugins": [],
|
|
18
|
-
"rules": {
|
|
19
|
-
"indent": [ "error", 4, {"SwitchCase": 1} ],
|
|
20
|
-
"linebreak-style": [ "error", "unix" ],
|
|
21
|
-
"no-console": "off",
|
|
22
|
-
"no-debugger": "off",
|
|
23
|
-
"no-shadow": "off",
|
|
24
|
-
"no-var": "error",
|
|
25
|
-
"prefer-const": "error",
|
|
26
|
-
"quotes": "off", // http://eslint.org/docs/rules/quotes
|
|
27
|
-
"semi": [ "error", "always" ]
|
|
28
|
-
}
|
|
29
|
-
}
|