mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
test: lint all js files and inline scripts in workflow (#2442)
* Lint all js files Closes #2414 * Lint inline scripts in workflow * Upgrade eslint-plugin-actions to 1.0.1 Test plan: 1. Add `console` statement to the script in `.github/workflows/ci.yml` 2. Check `no-console` error is shown in `eslint`
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
**/node_modules/*
|
**/node_modules/*
|
||||||
|
**/flow-typed/*
|
||||||
dist/*
|
dist/*
|
||||||
website/build/*
|
website/build/*
|
||||||
website/lib/remarkable-katex.js
|
website/lib/remarkable-katex.js
|
||||||
|
@@ -5,7 +5,8 @@
|
|||||||
],
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:flowtype/recommended"
|
"plugin:flowtype/recommended",
|
||||||
|
"plugin:actions/recommended"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"arrow-spacing": 2,
|
"arrow-spacing": 2,
|
||||||
@@ -101,6 +102,11 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"react/prop-types": 0
|
"react/prop-types": 0
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"files": [".github/workflows/*.{yaml,yml}/**/*.js"],
|
||||||
|
"rules": {
|
||||||
|
"indent-legacy": [2, 4, {"SwitchCase": 1, "outerIIFEBody": 0}],
|
||||||
|
}
|
||||||
}],
|
}],
|
||||||
"root": true
|
"root": true
|
||||||
}
|
}
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
"css-loader": "^4.0.0",
|
"css-loader": "^4.0.0",
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"eslint": "^7.4.0",
|
"eslint": "^7.4.0",
|
||||||
|
"eslint-plugin-actions": "^1.0.1",
|
||||||
"eslint-plugin-flowtype": "^5.2.0",
|
"eslint-plugin-flowtype": "^5.2.0",
|
||||||
"eslint-plugin-react": "^7.20.3",
|
"eslint-plugin-react": "^7.20.3",
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
@@ -83,7 +84,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "yarn test:lint && yarn test:flow && yarn test:jest",
|
"test": "yarn test:lint && yarn test:flow && yarn test:jest",
|
||||||
"test:lint": "yarn test:lint:js && yarn test:lint:css",
|
"test:lint": "yarn test:lint:js && yarn test:lint:css",
|
||||||
"test:lint:js": "eslint *.js src static test contrib dockers website",
|
"test:lint:js": "eslint .",
|
||||||
"test:lint:css": "stylelint src/katex.less static/main.css contrib/**/*.css website/static/**/*.css",
|
"test:lint:css": "stylelint src/katex.less static/main.css contrib/**/*.css website/static/**/*.css",
|
||||||
"test:flow": "flow",
|
"test:flow": "flow",
|
||||||
"test:jest": "jest",
|
"test:jest": "jest",
|
||||||
|
14
yarn.lock
14
yarn.lock
@@ -4619,6 +4619,17 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"eslint-plugin-actions@npm:^1.0.1":
|
||||||
|
version: 1.0.1
|
||||||
|
resolution: "eslint-plugin-actions@npm:1.0.1"
|
||||||
|
dependencies:
|
||||||
|
yaml: ^1.10.0
|
||||||
|
peerDependencies:
|
||||||
|
eslint: ^6.7.0 || ^7.0.0
|
||||||
|
checksum: a869d6bad48a0d405a4521aecdf6cbb2cc213566711e72e8d7d809529724455bc1981845a57a61ff790bcedf03b7bd792e9daf8b11637003cf096b4d74365c88
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"eslint-plugin-flowtype@npm:^5.2.0":
|
"eslint-plugin-flowtype@npm:^5.2.0":
|
||||||
version: 5.2.0
|
version: 5.2.0
|
||||||
resolution: "eslint-plugin-flowtype@npm:5.2.0"
|
resolution: "eslint-plugin-flowtype@npm:5.2.0"
|
||||||
@@ -7597,6 +7608,7 @@ fsevents@^1.2.7:
|
|||||||
css-loader: ^4.0.0
|
css-loader: ^4.0.0
|
||||||
cssnano: ^4.1.10
|
cssnano: ^4.1.10
|
||||||
eslint: ^7.4.0
|
eslint: ^7.4.0
|
||||||
|
eslint-plugin-actions: ^1.0.1
|
||||||
eslint-plugin-flowtype: ^5.2.0
|
eslint-plugin-flowtype: ^5.2.0
|
||||||
eslint-plugin-react: ^7.20.3
|
eslint-plugin-react: ^7.20.3
|
||||||
file-loader: ^6.0.0
|
file-loader: ^6.0.0
|
||||||
@@ -13552,7 +13564,7 @@ fsevents@^1.2.7:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"yaml@npm:^1.7.2":
|
"yaml@npm:^1.10.0, yaml@npm:^1.7.2":
|
||||||
version: 1.10.0
|
version: 1.10.0
|
||||||
resolution: "yaml@npm:1.10.0"
|
resolution: "yaml@npm:1.10.0"
|
||||||
checksum: d4cc9f9724f8d0aebc2cf52e4e6aa7059f12d50deb54b5225d103462fb2af36e5c0bb419101ca4b1f0cd3b4db9e4139cf2c690e863ac6227648d39d6f4e2522c
|
checksum: d4cc9f9724f8d0aebc2cf52e4e6aa7059f12d50deb54b5225d103462fb2af36e5c0bb419101ca4b1f0cd3b4db9e4139cf2c690e863ac6227648d39d6f4e2522c
|
||||||
|
Reference in New Issue
Block a user