node-editorconfig 1.4.1 → 1.5.1

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/.editorconfig CHANGED
@@ -41,7 +41,8 @@ insert_final_newline = false
41
41
  insert_final_newline = true
42
42
 
43
43
  # [{*.markdown,*.md,*.mdown,*.mkd,*.mkdn,*.text}] # https://superuser.com/questions/249436/file-extension-for-markdown-files/285878#285878
44
- [{*.md}]
44
+ # [*.mdc] # https://cursor.com/docs/context/rules#rule-file-structure
45
+ [{*.md,*.mdc}]
45
46
  trim_trailing_whitespace = false # https://stackoverflow.com/editing-help#linebreaks
46
47
 
47
48
  [{*.bat,*.cmd}]
@@ -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.4.1",
3
+ "version": "1.5.1",
4
4
  "description": "A generic .editorconfig for Node JS projects. $ npm i -g node-editorconfig ; node-editorconfig",
5
5
  "engines": {
6
- "node": ">=20"
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": "=8.57.1"
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
- }