Start linting with lit-analyzer (#19302)
This commit is contained in:
parent
ec2ae15e3f
commit
e0f578c135
|
@ -48,6 +48,8 @@ jobs:
|
|||
run: yarn run lint:eslint --quiet
|
||||
- name: Run tsc
|
||||
run: yarn run lint:types
|
||||
- name: Run lit-analyzer
|
||||
run: yarn run lint:lit --quiet
|
||||
- name: Run prettier
|
||||
run: yarn run lint:prettier
|
||||
test:
|
||||
|
|
|
@ -2,6 +2,7 @@ export default {
|
|||
"*.?(c|m){js,ts}": [
|
||||
"eslint --cache --cache-strategy=content --cache-location=node_modules/.cache/eslint/.eslintcache --fix",
|
||||
"prettier --cache --write",
|
||||
"lit-analyzer",
|
||||
],
|
||||
"*.{json,css,md,markdown,html,y?aml}": "prettier --cache --write",
|
||||
"translations/*/*.json": (files) =>
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
"lint:prettier": "prettier . --cache --check",
|
||||
"format:prettier": "prettier . --cache --write",
|
||||
"lint:types": "tsc",
|
||||
"lint:lit": "lit-analyzer \"**/src/**/*.ts\" --format markdown --outFile result.md",
|
||||
"lint": "yarn run lint:eslint && yarn run lint:prettier && yarn run lint:types",
|
||||
"lint:lit": "lit-analyzer \"{.,*}/src/**/*.ts\"",
|
||||
"lint": "yarn run lint:eslint && yarn run lint:prettier && yarn run lint:types && yarn run lint:lit",
|
||||
"format": "yarn run format:eslint && yarn run format:prettier",
|
||||
"postinstall": "husky install",
|
||||
"prepack": "pinst --disable",
|
||||
|
|
|
@ -25,15 +25,25 @@
|
|||
"plugins": [
|
||||
{
|
||||
"name": "ts-lit-plugin",
|
||||
"strict": false,
|
||||
"strict": true,
|
||||
"rules": {
|
||||
"no-unknown-tag-name": "error",
|
||||
"no-missing-import": "error",
|
||||
"no-unclosed-tag": "error",
|
||||
"no-incompatible-type-binding": "warning",
|
||||
"no-invalid-css": "warning",
|
||||
// Custom elements
|
||||
"no-unclosed-tag": "warning",
|
||||
"no-missing-element-type-definition": "warning",
|
||||
"no-property-visibility-mismatch": "error"
|
||||
// Binding names
|
||||
"no-legacy-attribute": "error",
|
||||
// Binding types
|
||||
"no-boolean-in-attribute-binding": "warning",
|
||||
"no-expressionless-property-binding": "warning",
|
||||
"no-complex-attribute-binding": "warning",
|
||||
"no-nullable-attribute-binding": "warning",
|
||||
"no-incompatible-type-binding": "warning",
|
||||
"no-invalid-directive-binding": "warning",
|
||||
// LitElement
|
||||
"no-incompatible-property-type": "warning",
|
||||
"no-property-visibility-mismatch": "warning",
|
||||
// CSS
|
||||
"no-invalid-css": "off" // warning does not work
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue