diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 917ac2e..9eb5aab 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -37,4 +37,7 @@ jobs: run: yarn run fmt:check - name: Run eslint - run: yarn run lint + run: yarn run lint:ts + + - name: Run stylelint + run: yarn run lint:css diff --git a/.gitignore b/.gitignore index a339e93..7aea46a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,5 +22,8 @@ yarn-error.log # eslint .eslintcache +# stylelint +.stylelintcache + # coverage coverage/ diff --git a/package.json b/package.json index 7d47844..33ef62f 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,9 @@ "test": "yarn jest", "build": "webpack && node ./.scripts/set-executable.js ./dist/server.js", "package": "npx vsce package --no-yarn --readme-path editors/code/README.md", - "lint": "eslint --cache .", - "lint:css": "npx stylelint \"editors/**/*.css\"", + "lint": "yarn run lint:ts && yarn run lint:css", + "lint:ts": "eslint --cache .", + "lint:css": "stylelint 'editors/**/*.css' --cache", "fmt": "prettier --write -l --cache .", "fmt:check": "prettier --check --cache .", "grammar:wasm": "yarn grammar:tolk:wasm && yarn grammar:func:wasm && yarn grammar:fift:wasm && yarn grammar:tlb:wasm", @@ -48,7 +49,7 @@ "grammar:fift:wasm": "cd server/src/languages/fift/tree-sitter-fift && tree-sitter generate && tree-sitter build --wasm", "grammar:tlb:wasm": "cd server/src/languages/tlb/tree-sitter-tlb && tree-sitter generate && tree-sitter build --wasm", "watch": "webpack --watch", - "precommit": "yarn build && yarn fmt && yarn lint --fix && yarn run lint:css --fix", + "precommit": "yarn build && yarn fmt && yarn lint:ts --fix && yarn run lint:css --fix", "test:grammars": "yarn test:grammars:tolk && yarn test:grammars:func && yarn test:grammars:fift && yarn test:grammars:tlb", "test:grammars:tolk": "cd ./server/src/languages/tolk/tree-sitter-tolk/ && tree-sitter test", "test:grammars:func": "cd ./server/src/languages/func/tree-sitter-func/ && tree-sitter test",