chore: run prettier and eslint separately #113

Merged
saluu merged 1 commit from run-prettier-and-eslint-separately into main 2023-07-10 22:04:10 +02:00
6 changed files with 23 additions and 81 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -50,9 +50,6 @@ devDependencies:
eslint-config-prettier:
specifier: 8.8.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:
specifier: 11.1.1
version: 11.1.1
@ -2068,23 +2065,6 @@ packages:
eslint: 8.44.0
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:
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
engines: {node: '>=8.0.0'}
@ -2224,10 +2204,6 @@ packages:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
dev: true
/fast-diff@1.2.0:
resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==}
dev: true
/fast-glob@3.2.12:
resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==}
engines: {node: '>=8.6.0'}
@ -3945,13 +3921,6 @@ packages:
engines: {node: '>= 0.8.0'}
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:
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
engines: {node: '>=10.13.0'}

View file

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