Skip to content

Commit 168c42e

Browse files
committedJun 25, 2023
fix: changed eslint-plugin-es to eslint-plugin-es-x
Signed-off-by: prisis <d.bannert@anolilab.de>
1 parent f72ff1d commit 168c42e

File tree

6 files changed

+26
-38
lines changed

6 files changed

+26
-38
lines changed
 

‎README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Javascript Style Guide
1+
<div align="center">
2+
<h1>Javascript Style Guide</h1>
23

34
This project is a shareable code style guide of all basic back- and front end project used at Anolilab.
5+
</div>
46

57
---
68

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"packages/*"
5555
],
5656
"scripts": {
57-
"build:packages": "pnpm --filter \"package-json-utils\" run build && nx run-many --target=build --projects=browserslist-config-anolilab,babel-preset,prettier-config,textlint-config,semantic-release-preset,stylelint-config,eslint-config,commitlint-config",
58-
"build:prod:packages": "pnpm --filter \"package-json-utils\" run build:prod && nx run-many --target=build:prod --projects=browserslist-config-anolilab,babel-preset,prettier-config,textlint-config,semantic-release-preset,stylelint-config,eslint-config,commitlint-config",
57+
"build:packages": "pnpm --filter \"package-json-utils\" run build && nx run-many --target=build --projects=browserslist-config-anolilab,babel-preset,prettier-config,textlint-config,semantic-release-preset,stylelint-config,eslint-config,commitlint-config,lint-staged-config",
58+
"build:prod:packages": "pnpm --filter \"package-json-utils\" run build:prod && nx run-many --target=build:prod --projects=browserslist-config-anolilab,babel-preset,prettier-config,textlint-config,semantic-release-preset,stylelint-config,eslint-config,commitlint-config,lint-staged-config",
5959
"preinstall": "node verify-node-version.cjs",
6060
"postinstall": "is-ci || husky install",
6161
"lint:eslint": "cross-env NO_LOGS=true eslint -c ./.eslintrc.cjs --ext .js,.cjs,.mjs,.ts,.tsx ./packages --cache --cache-strategy content .",

‎packages/eslint-config/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"eslint-import-resolver-typescript": "^3.5.5",
126126
"eslint-plugin-antfu": "^0.39.5",
127127
"eslint-plugin-compat": "^4.1.4",
128-
"eslint-plugin-es": "^4.1.0",
128+
"eslint-plugin-es-x": "^7.1.0",
129129
"eslint-plugin-eslint-comments": "^3.2.0",
130130
"eslint-plugin-html": "^7.1.0",
131131
"eslint-plugin-i": "^2.27.5",
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import type { Linter } from "eslint";
22

3-
const config: Linter.Config = {
4-
plugins: ["es"],
3+
import { createConfig } from "../../utils/create-config";
54

6-
overrides: [
7-
{
8-
files: ["*.js", "*.jsx"],
9-
settings: {
10-
es: { aggressive: true },
11-
},
12-
},
13-
],
14-
};
5+
const config: Linter.Config = createConfig("all", {
6+
plugins: ["es-x"],
7+
settings: {
8+
es: { aggressive: true },
9+
},
10+
});
1511

1612
export default config;

‎packages/eslint-config/src/postinstall.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ const writeEslintRc = () => {
3939

4040
ecmaVersion = ecmaVersion.toLowerCase() === "es2022" || ecmaVersion.toLowerCase() === "esnext" ? "latest" : ecmaVersion.toLowerCase().replace("es", "");
4141

42-
if (ecmaVersion !== "latest" && ecmaVersion !== "2022" && ecmaVersion !== "2021" && ecmaVersion !== "2021" && ecmaVersion !== "6") {
43-
pluginExtends = `, "plugin:es/restrict-to-es${ecmaVersion}"`;
42+
if (ecmaVersion !== "latest" && ecmaVersion !== "2022" && ecmaVersion !== "2021" && ecmaVersion !== "6") {
43+
pluginExtends = `, "plugin:es-x/restrict-to-es${ecmaVersion}"`;
4444
}
4545
}
4646

‎pnpm-lock.yaml

+11-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.