chore: run prettier and eslint separately
All checks were successful
ci/woodpecker/pr/checks Pipeline was successful
ci/woodpecker/push/checks Pipeline was successful

This commit is contained in:
Johannes Loher 2023-07-10 22:01:53 +02:00
parent 78e073432f
commit bd32dad1c5
Signed by: saluu
GPG key ID: 7CB0A9FB553DA045
6 changed files with 23 additions and 81 deletions

View file

@ -4,36 +4,12 @@
module.exports = { module.exports = {
parser: "@typescript-eslint/parser", parser: "@typescript-eslint/parser",
parserOptions: { ecmaVersion: 2020, sourceType: "module" },
parserOptions: { env: { browser: true },
ecmaVersion: 2020, extends: ["plugin:@typescript-eslint/recommended", "prettier"],
sourceType: "module",
},
env: {
browser: true,
},
extends: ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
plugins: ["@typescript-eslint"], plugins: ["@typescript-eslint"],
rules: {
// Specify any specific ESLint rules.
},
overrides: [ overrides: [
{ { files: ["./*.cjs"], rules: { "@typescript-eslint/no-var-requires": "off" } },
files: ["./*.cjs", "./*.js"], { files: ["./spec/**/*"], env: { browser: false } },
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
{
files: ["./spec/**/*"],
env: {
browser: false,
},
},
], ],
}; };

View file

@ -29,6 +29,12 @@ steps:
commands: commands:
- <<: *enable_pnpm - <<: *enable_pnpm
- pnpm lint - pnpm lint
formatcheck:
group: check
image: *node_image
commands:
- <<: *enable_pnpm
- pnpm format:check
typecheck: typecheck:
group: check group: check
image: *node_image image: *node_image

View file

@ -34,6 +34,7 @@ steps:
- git config user.name woodpecker[bot] - git config user.name woodpecker[bot]
- git config user.email woodpecker[bot]@${CI_SYSTEM_HOST} - git config user.email woodpecker[bot]@${CI_SYSTEM_HOST}
- pnpm bump-version --release=${RELEASE_TYPE} - pnpm bump-version --release=${RELEASE_TYPE}
- pnpm exec prettier package.json system.json
- export RELEASE_VERSION=$(jq -r '.version' < package.json) - export RELEASE_VERSION=$(jq -r '.version' < package.json)
- git --no-pager diff - git --no-pager diff
- git add package.json system.json - git add package.json system.json

View file

@ -47,9 +47,12 @@
"clean": "run-p clean:files clean:link", "clean": "run-p clean:files clean:link",
"clean:files": "rimraf dist", "clean:files": "rimraf dist",
"clean:link": "node ./tools/link-package.js --clean", "clean:link": "node ./tools/link-package.js --clean",
"lint": "eslint --ext .ts,.js,.cjs,.mjs .", "lint": "pnpm eslint",
"lint:fix": "eslint --ext .ts,.js,.cjs,.mjs --fix .", "lint:fix": "pnpm eslint --fix",
"format": "prettier --write \"./**/*.(ts|js|cjs|mjs|json|scss|yml)\"", "eslint": "eslint --ext .ts,.js,.cjs,.mjs .",
"format": "pnpm prettier --write",
"format:check": "pnpm prettier --check",
"prettier": "prettier \"./**/*.(ts|js|cjs|mjs|json|scss|yml)\"",
"test": "run-p test:vitest test:typecheck", "test": "run-p test:vitest test:typecheck",
"test:vitest": "vitest run", "test:vitest": "vitest run",
"test:typecheck": "tsc --noEmit --project spec/tsconfig.json", "test:typecheck": "tsc --noEmit --project spec/tsconfig.json",
@ -77,7 +80,6 @@
"conventional-changelog-conventionalcommits": "6.1.0", "conventional-changelog-conventionalcommits": "6.1.0",
"eslint": "8.44.0", "eslint": "8.44.0",
"eslint-config-prettier": "8.8.0", "eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "4.2.1",
"fs-extra": "11.1.1", "fs-extra": "11.1.1",
"handlebars": "4.7.7", "handlebars": "4.7.7",
"npm-run-all": "4.1.5", "npm-run-all": "4.1.5",
@ -93,5 +95,5 @@
"vitest": "0.33.0", "vitest": "0.33.0",
"yargs": "17.7.2" "yargs": "17.7.2"
}, },
"packageManager": "pnpm@8.6.6" "packageManager": "pnpm@8.6.7"
} }

View file

@ -50,9 +50,6 @@ devDependencies:
eslint-config-prettier: eslint-config-prettier:
specifier: 8.8.0 specifier: 8.8.0
version: 8.8.0(eslint@8.44.0) version: 8.8.0(eslint@8.44.0)
eslint-plugin-prettier:
specifier: 4.2.1
version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.44.0)(prettier@2.8.8)
fs-extra: fs-extra:
specifier: 11.1.1 specifier: 11.1.1
version: 11.1.1 version: 11.1.1
@ -2068,23 +2065,6 @@ packages:
eslint: 8.44.0 eslint: 8.44.0
dev: true dev: true
/eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.44.0)(prettier@2.8.8):
resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==}
engines: {node: '>=12.0.0'}
peerDependencies:
eslint: '>=7.28.0'
eslint-config-prettier: '*'
prettier: '>=2.0.0'
peerDependenciesMeta:
eslint-config-prettier:
optional: true
dependencies:
eslint: 8.44.0
eslint-config-prettier: 8.8.0(eslint@8.44.0)
prettier: 2.8.8
prettier-linter-helpers: 1.0.0
dev: true
/eslint-scope@5.1.1: /eslint-scope@5.1.1:
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
engines: {node: '>=8.0.0'} engines: {node: '>=8.0.0'}
@ -2224,10 +2204,6 @@ packages:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
dev: true dev: true
/fast-diff@1.2.0:
resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==}
dev: true
/fast-glob@3.2.12: /fast-glob@3.2.12:
resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==}
engines: {node: '>=8.6.0'} engines: {node: '>=8.6.0'}
@ -3945,13 +3921,6 @@ packages:
engines: {node: '>= 0.8.0'} engines: {node: '>= 0.8.0'}
dev: true dev: true
/prettier-linter-helpers@1.0.0:
resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
engines: {node: '>=6.0.0'}
dependencies:
fast-diff: 1.2.0
dev: true
/prettier@2.8.8: /prettier@2.8.8:
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
engines: {node: '>=10.13.0'} engines: {node: '>=10.13.0'}

View file

@ -36,28 +36,16 @@
"version": "1.20.0-0", "version": "1.20.0-0",
"flags": { "flags": {
"hotReload": { "hotReload": {
"extensions": [ "extensions": ["css", "hbs", "json"],
"css", "paths": ["templates", "css", "lang"]
"hbs",
"json"
],
"paths": [
"templates",
"css",
"lang"
]
} }
}, },
"compatibility": { "compatibility": {
"minimum": "11.305", "minimum": "11.305",
"verified": "11" "verified": "11"
}, },
"esmodules": [ "esmodules": ["ds4.js"],
"ds4.js" "styles": ["css/ds4.css"],
],
"styles": [
"css/ds4.css"
],
"languages": [ "languages": [
{ {
"lang": "en", "lang": "en",