@jgarber/eslint-config 1.1.0 → 1.1.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/README.md +1 -2
- package/package.json +6 -6
- package/.editorconfig +0 -10
- package/.github/dependabot.yml +0 -15
- package/.github/workflows/ci.yml +0 -27
- package/.nvmrc +0 -1
- package/eslint.config.js +0 -15
- package/spec/indexSpec.js +0 -24
- package/spec/support/jasmine.json +0 -14
package/README.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Shareable [ESLint](https://eslint.org) configuration.
|
|
4
4
|
|
|
5
|
-
>
|
|
6
|
-
>
|
|
5
|
+
> [!IMPORTANT]\
|
|
7
6
|
> As of v1.0.0, this shareable configuration uses ESLint's new "flat" configuration file format and, thus, may not be suitable for every project. See [the official documentation](https://eslint.org/docs/latest/use/configure/configuration-files-new) for details.
|
|
8
7
|
|
|
9
8
|
## Installation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jgarber/eslint-config",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Shareable ESLint configuration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"node": ">=16.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"eslint": "^8.
|
|
25
|
+
"eslint": "^8.45.0",
|
|
26
26
|
"eslint-config-standard": "^17.1.0",
|
|
27
27
|
"globals": "^13.20.0",
|
|
28
|
-
"jasmine": "^5.0
|
|
28
|
+
"jasmine": "^5.1.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"eslint": ">=8.43
|
|
32
|
-
"eslint-config-standard": ">=17.1
|
|
33
|
-
"globals": ">=13.20
|
|
31
|
+
"eslint": ">=8.43",
|
|
32
|
+
"eslint-config-standard": ">=17.1",
|
|
33
|
+
"globals": ">=13.20"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
package/.editorconfig
DELETED
package/.github/dependabot.yml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
|
|
3
|
-
updates:
|
|
4
|
-
- package-ecosystem: "github-actions"
|
|
5
|
-
directory: "/"
|
|
6
|
-
schedule:
|
|
7
|
-
interval: "weekly"
|
|
8
|
-
assignees:
|
|
9
|
-
- "jgarber623"
|
|
10
|
-
- package-ecosystem: "npm"
|
|
11
|
-
directory: "/"
|
|
12
|
-
schedule:
|
|
13
|
-
interval: "monthly"
|
|
14
|
-
assignees:
|
|
15
|
-
- "jgarber623"
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on: push
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
lint:
|
|
7
|
-
name: Lint files
|
|
8
|
-
runs-on: ubuntu-20.04
|
|
9
|
-
steps:
|
|
10
|
-
- uses: actions/checkout@v3
|
|
11
|
-
- uses: actions/setup-node@v3
|
|
12
|
-
with:
|
|
13
|
-
node-version-file: ".nvmrc"
|
|
14
|
-
cache: npm
|
|
15
|
-
- run: npm ci
|
|
16
|
-
- run: npm run lint
|
|
17
|
-
test:
|
|
18
|
-
name: Test files
|
|
19
|
-
runs-on: ubuntu-20.04
|
|
20
|
-
steps:
|
|
21
|
-
- uses: actions/checkout@v3
|
|
22
|
-
- uses: actions/setup-node@v3
|
|
23
|
-
with:
|
|
24
|
-
node-version-file: ".nvmrc"
|
|
25
|
-
cache: npm
|
|
26
|
-
- run: npm ci
|
|
27
|
-
- run: npm test
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
lts/*
|
package/eslint.config.js
DELETED
package/spec/indexSpec.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const { FlatESLint } = require('eslint/use-at-your-own-risk');
|
|
2
|
-
|
|
3
|
-
const config = require('../index');
|
|
4
|
-
|
|
5
|
-
it('exports an Array', () => {
|
|
6
|
-
expect(Array.isArray(config)).toBe(true);
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
it('loads the config and validates correct syntax', async () => {
|
|
10
|
-
const eslint = new FlatESLint({ baseConfig: config });
|
|
11
|
-
const [results] = await eslint.lintText(';\n');
|
|
12
|
-
|
|
13
|
-
expect(results.errorCount).toEqual(0);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('loads the config and invalidates incorrect syntax', async () => {
|
|
17
|
-
const eslint = new FlatESLint({ baseConfig: config });
|
|
18
|
-
const [results] = await eslint.lintText('(() => {}) ()\n');
|
|
19
|
-
|
|
20
|
-
const ruleIds = results.messages.map(({ ruleId }) => ruleId);
|
|
21
|
-
|
|
22
|
-
expect(results.errorCount).toEqual(2);
|
|
23
|
-
expect(ruleIds).toEqual(jasmine.arrayContaining(['func-call-spacing', 'semi']));
|
|
24
|
-
});
|