mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
web: Set up eslint
This commit is contained in:
parent
de01f861dd
commit
05fe9ec4a5
3 changed files with 1712 additions and 3 deletions
31
web/.eslintrc.js
Normal file
31
web/.eslintrc.js
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
es2021: true,
|
||||||
|
},
|
||||||
|
extends: ["standard-with-typescript", "plugin:wc/best-practice"],
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
files: [".eslintrc.{js,cjs}"],
|
||||||
|
parserOptions: {
|
||||||
|
sourceType: "script",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
sourceType: "module",
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
semi: [2, "always"],
|
||||||
|
"@typescript-eslint/semi": "off",
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
wc: {
|
||||||
|
elementBaseClasses: ["LitElement"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -4,7 +4,9 @@
|
||||||
"description": "A web lottie player using ThorVG as a renderer",
|
"description": "A web lottie player using ThorVG as a renderer",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"lint": "eslint ./src --ext .ts,.tsx,.js",
|
||||||
|
"lint:fix": "eslint ./src --ext .ts,.tsx,.js --fix"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -23,6 +25,13 @@
|
||||||
"tvg"
|
"tvg"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.3.2"
|
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
||||||
|
"eslint": "^8.0.1",
|
||||||
|
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||||
|
"eslint-plugin-import": "^2.25.2",
|
||||||
|
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
|
||||||
|
"eslint-plugin-promise": "^6.0.0",
|
||||||
|
"eslint-plugin-wc": "^2.0.4",
|
||||||
|
"typescript": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1671
web/yarn.lock
1671
web/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue