eslint-config-crowdstrike-node 3.0.1 → 4.0.0-beta.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.
Files changed (3) hide show
  1. package/index.js +35 -24
  2. package/package.json +17 -13
  3. package/CHANGELOG.md +0 -49
package/index.js CHANGED
@@ -1,28 +1,39 @@
1
1
  'use strict';
2
2
 
3
- module.exports = {
4
- env: {
5
- node: true,
6
- },
7
- extends: [
8
- 'crowdstrike',
9
- 'plugin:node/recommended',
10
- ],
11
- plugins: [
12
- 'json-files',
13
- ],
14
- rules: {
15
- 'strict': 'error',
3
+ const jsonFiles = require('eslint-plugin-json-files');
4
+ const globals = require('globals');
5
+ const { FlatCompat } = require('@eslint/eslintrc');
6
+ const js = require('@eslint/js');
7
+ const nodePlugin = require('eslint-plugin-n');
16
8
 
17
- 'node/no-unsupported-features/es-syntax': ['error', {
18
- 'ignores': [
19
- // remove once https://github.com/mysticatea/eslint-plugin-node/issues/250 is fixed
20
- 'dynamicImport',
21
- ],
22
- }],
9
+ const compat = new FlatCompat({
10
+ baseDirectory: __dirname, // optional; default: process.cwd()
11
+ resolvePluginsRelativeTo: __dirname, // optional
12
+ recommendedConfig: js.configs.recommended, // optional unless using "eslint:recommended"
13
+ });
23
14
 
24
- 'json-files/require-engines': 'error',
25
- 'json-files/require-license': 'error',
26
- 'json-files/restrict-ranges': ['error', { pinUnstable: true }],
27
- },
28
- };
15
+ module.exports = [
16
+ nodePlugin.configs['flat/recommended-script'],
17
+ ...compat.extends('crowdstrike'),
18
+ {
19
+ files: ['**/*.json'],
20
+ plugins: {
21
+ 'json-files': jsonFiles,
22
+ },
23
+ processor: 'json-files/json',
24
+ languageOptions: {
25
+ globals: {
26
+ ...globals.node,
27
+ },
28
+ },
29
+
30
+ rules: {
31
+ strict: 'error',
32
+ 'json-files/require-engines': 'error',
33
+ 'json-files/require-license': 'error',
34
+
35
+ 'json-files/restrict-ranges': ['error', {
36
+ pinUnstable: true,
37
+ }],
38
+ },
39
+ }];
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "eslint-config-crowdstrike-node",
3
- "version": "3.0.1",
3
+ "version": "4.0.0-beta.1",
4
4
  "description": "ESLint Node.js config for CrowdStrike",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "index.js"
8
8
  ],
9
9
  "scripts": {
10
- "lint:git": "commitlint",
11
- "lint:js": "eslint . --ext js,json",
10
+ "lint:git": "commitlint --default-branch main",
11
+ "lint:js": "eslint .",
12
12
  "lint:md": "remark -f README.md",
13
13
  "release": "standard-version",
14
14
  "test": "yarn lint:git && yarn lint:js && yarn lint:md"
@@ -32,21 +32,25 @@
32
32
  "url": "https://github.com/CrowdStrike/eslint-config-crowdstrike-node/issues"
33
33
  },
34
34
  "homepage": "https://github.com/CrowdStrike/eslint-config-crowdstrike-node#readme",
35
+ "dependencies": {
36
+ "@eslint/eslintrc": "^3.1.0",
37
+ "@eslint/js": "^9.8.0",
38
+ "eslint-plugin-json-files": "^4.3.0",
39
+ "eslint-plugin-n": "^17.0.0",
40
+ "globals": "^15.8.0"
41
+ },
35
42
  "devDependencies": {
36
- "@crowdstrike/commitlint": "^4.0.0",
37
- "eslint": "^7.0.0",
38
- "eslint-config-crowdstrike": "^3.0.0",
43
+ "@crowdstrike/commitlint": "^8.0.0",
44
+ "eslint": "^9.0.0",
45
+ "eslint-config-crowdstrike": "10.1.0",
39
46
  "eslint-config-crowdstrike-node": "link:",
40
- "eslint-plugin-json-files": "1.1.0",
41
- "eslint-plugin-node": "^11.0.0",
42
- "remark-cli": "^9.0.0",
43
- "remark-preset-lint-crowdstrike": "^2.0.0",
47
+ "remark-cli": "^12.0.0",
48
+ "remark-preset-lint-crowdstrike": "^4.0.0",
44
49
  "renovate-config-standard": "^2.0.0",
45
50
  "standard-version": "^9.0.0"
46
51
  },
47
52
  "peerDependencies": {
48
- "eslint-config-crowdstrike": ">=1",
49
- "eslint-plugin-json-files": ">=0.8",
50
- "eslint-plugin-node": ">=10"
53
+ "eslint": ">=8.57.0",
54
+ "eslint-config-crowdstrike": ">=1"
51
55
  }
52
56
  }
package/CHANGELOG.md DELETED
@@ -1,49 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ### [3.0.1](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/compare/v3.0.0...v3.0.1) (2021-06-15)
6
-
7
-
8
- ### Bug Fixes
9
-
10
- * ignore `dynamicImport` false errors ([6bed22d](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/commit/6bed22d0c0452808374fa0dc69d3659a14b48e32))
11
- * remove engines ([d13356b](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/commit/d13356b7fec89e47f92127d8d3f89547a22600c1))
12
-
13
- ## [3.0.0](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/compare/v2.2.0...v3.0.0) (2020-10-16)
14
-
15
-
16
- ### ⚠ BREAKING CHANGES
17
-
18
- * bump to node 10
19
- * require `use strict` in node files
20
-
21
- ### Features
22
-
23
- * bump to node 10 ([9261166](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/commit/9261166b7ff15b0f6077c806f856f85c5e5c583e))
24
- * require `use strict` in node files ([c44b908](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/commit/c44b908381ecd9186b53f640235850803fca9c6a))
25
-
26
- ## [2.2.0](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/compare/v2.1.0...v2.2.0) (2020-02-05)
27
-
28
-
29
- ### Features
30
-
31
- * relax `eslint-config-crowdstrike` peer dep ([51508eb](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/commit/51508eb7b7fc8e90be908b3242feb7402785cae4))
32
-
33
- ## [2.1.0](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/compare/v2.0.1...v2.1.0) (2020-01-28)
34
-
35
-
36
- ### Features
37
-
38
- * relax `eslint-plugin-node` peer dep constraint ([d351720](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/commit/d351720e3ea2a65c3f7ed522581ffa3f008c7fb0))
39
-
40
- ### [2.0.1](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/compare/v2.0.0...v2.0.1) (2019-10-01)
41
-
42
- ## [2.0.0](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/compare/v1.0.0...v2.0.0) (2019-09-11)
43
-
44
-
45
- ### ⚠ BREAKING CHANGES
46
-
47
- * **deps:** peer dep changed
48
-
49
- * **deps:** update dependency eslint-plugin-node to v10 ([5476546](https://github.com/CrowdStrike/eslint-config-crowdstrike-node/commit/5476546))