@kontent-ai/eslint-config 2.2.1 → 2.4.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/.github/workflows/release.yml +10 -8
- package/README.md +2 -2
- package/index.js +0 -8
- package/package.json +10 -6
- package/react.js +0 -4
|
@@ -2,23 +2,25 @@ on:
|
|
|
2
2
|
release:
|
|
3
3
|
types: [published]
|
|
4
4
|
|
|
5
|
+
permissions:
|
|
6
|
+
# Required for OIDC publishing
|
|
7
|
+
id-token: write
|
|
8
|
+
|
|
5
9
|
name: publish-to-npm
|
|
6
10
|
jobs:
|
|
7
11
|
publish:
|
|
8
12
|
runs-on: ubuntu-latest
|
|
9
13
|
|
|
10
14
|
steps:
|
|
11
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
|
+
- name: Install pnpm
|
|
17
|
+
uses: pnpm/action-setup@v4
|
|
12
18
|
- name: Use Node.js
|
|
13
|
-
uses: actions/setup-node@
|
|
19
|
+
uses: actions/setup-node@v6
|
|
14
20
|
with:
|
|
15
21
|
node-version-file: '.nvmrc'
|
|
16
22
|
registry-url: 'https://registry.npmjs.org'
|
|
17
|
-
- run:
|
|
23
|
+
- run: pnpm publish --access=public --no-git-checks
|
|
18
24
|
if: ${{!github.event.release.prerelease}}
|
|
19
|
-
|
|
20
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
|
|
21
|
-
- run: npm publish --tag prerelease
|
|
25
|
+
- run: pnpm publish --tag prerelease --no-git-checks
|
|
22
26
|
if: ${{github.event.release.prerelease}}
|
|
23
|
-
env:
|
|
24
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
|
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ This is the eslint configuration that Kontent.ai uses for its TypeScript package
|
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
20
|
# optionaly install eslint if you don't already have it
|
|
21
|
-
#
|
|
22
|
-
|
|
21
|
+
# pnpm add -D eslint
|
|
22
|
+
pnpm add -D @kontent-ai/eslint-config
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
1. Extend the configuration in your `eslint.config.js` file (Flat Config format for ESLint 9+ is required)
|
package/index.js
CHANGED
|
@@ -32,14 +32,10 @@ export default defineConfig([{
|
|
|
32
32
|
"@typescript-eslint/no-redundant-type-constituents": "error",
|
|
33
33
|
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
|
34
34
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
|
35
|
-
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
36
35
|
"@typescript-eslint/prefer-includes": "error",
|
|
37
36
|
"@typescript-eslint/prefer-return-this-type": "error",
|
|
38
37
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
39
38
|
"@typescript-eslint/await-thenable": "error",
|
|
40
|
-
"@typescript-eslint/no-floating-promises": "error",
|
|
41
|
-
"@typescript-eslint/no-for-in-array": "error",
|
|
42
|
-
"@typescript-eslint/no-misused-promises": "error",
|
|
43
39
|
"@typescript-eslint/no-unsafe-argument": "error",
|
|
44
40
|
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
45
41
|
"@typescript-eslint/no-unsafe-call": "error",
|
|
@@ -48,14 +44,10 @@ export default defineConfig([{
|
|
|
48
44
|
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
49
45
|
"@typescript-eslint/restrict-plus-operands": "error",
|
|
50
46
|
"@typescript-eslint/restrict-template-expressions": "error",
|
|
51
|
-
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
52
47
|
"@typescript-eslint/unbound-method": "error",
|
|
53
48
|
"@typescript-eslint/no-duplicate-enum-values": "error",
|
|
54
|
-
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
55
49
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
56
|
-
"@typescript-eslint/unified-signatures": "error",
|
|
57
50
|
"@typescript-eslint/promise-function-async": "error",
|
|
58
|
-
"@typescript-eslint/require-array-sort-compare": "error",
|
|
59
51
|
"@typescript-eslint/no-mixed-enums": "error",
|
|
60
52
|
"@typescript-eslint/no-unsafe-enum-comparison": "error",
|
|
61
53
|
},
|
package/package.json
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kontent-ai/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Eslint configuration used for packages in Kontent.ai",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/kontent-ai/eslint-config.git"
|
|
11
|
+
},
|
|
8
12
|
"exports": {
|
|
9
13
|
".": "./index.js",
|
|
10
14
|
"./react": "./react.js"
|
|
11
15
|
},
|
|
12
|
-
"scripts": {},
|
|
13
16
|
"author": "Jiri Lojda",
|
|
14
17
|
"license": "MIT",
|
|
15
18
|
"dependencies": {
|
|
16
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
17
|
-
"@typescript-eslint/parser": "^8.
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
20
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
18
21
|
"eslint": "^9.39.1",
|
|
19
22
|
"eslint-plugin-react": "^7.37.5"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
23
|
+
},
|
|
24
|
+
"scripts": {}
|
|
25
|
+
}
|
package/react.js
CHANGED
|
@@ -8,7 +8,6 @@ export default defineConfig([{
|
|
|
8
8
|
react: reactPlugin,
|
|
9
9
|
},
|
|
10
10
|
rules: {
|
|
11
|
-
"react/jsx-boolean-value": "error",
|
|
12
11
|
"react/jsx-equals-spacing": "error",
|
|
13
12
|
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
|
|
14
13
|
"react/jsx-first-prop-new-line": ["error", "multiline"],
|
|
@@ -45,9 +44,6 @@ export default defineConfig([{
|
|
|
45
44
|
"react/no-unknown-property": ["error", { ignore: ["css"] }],
|
|
46
45
|
"react/no-typos": "error",
|
|
47
46
|
"react/no-this-in-sfc": "error",
|
|
48
|
-
"react/self-closing-comp": "error",
|
|
49
47
|
"react/style-prop-object": "error",
|
|
50
|
-
"react/jsx-no-leaked-render": "error",
|
|
51
|
-
"react/prefer-stateless-function": "error",
|
|
52
48
|
},
|
|
53
49
|
}]);
|