🚨 Add linter

This commit is contained in:
trickypr 2021-10-02 11:43:02 +10:00
parent 481da731e5
commit 6f6ce08a89
4 changed files with 1646 additions and 10 deletions

3
.eslintignore Normal file
View file

@ -0,0 +1,3 @@
dist/
node_modules/
template/

19
.eslintrc.json Normal file
View file

@ -0,0 +1,19 @@
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"airbnb",
"eslint-config-prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {}
}

View file

@ -10,6 +10,7 @@
"test": "echo \"Error: no test specified\"", "test": "echo \"Error: no test specified\"",
"build": "tsc && echo \"#!/bin/node\"|cat - ./dist/index.js > /tmp/out && mv /tmp/out ./dist/index.js && chmod +x ./dist/index.js", "build": "tsc && echo \"#!/bin/node\"|cat - ./dist/index.js > /tmp/out && mv /tmp/out ./dist/index.js && chmod +x ./dist/index.js",
"format": "prettier . -w", "format": "prettier . -w",
"lint": "eslint .",
"app": "ts-node ./src/index", "app": "ts-node ./src/index",
"docs:install": "", "docs:install": "",
"docs:build": "zola --root docs/ build", "docs:build": "zola --root docs/ build",
@ -54,8 +55,17 @@
"@types/prompts": "^2.0.14", "@types/prompts": "^2.0.14",
"@types/rimraf": "^3.0.0", "@types/rimraf": "^3.0.0",
"@types/sharp": "^0.29.2", "@types/sharp": "^0.29.2",
"typescript": "^4.1.3", "@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^4.32.0",
"eslint": "^7.2.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^1.7.0",
"prettier": "^2.2.1", "prettier": "^2.2.1",
"ts-node": "^10.2.1" "ts-node": "^10.2.1",
"typescript": "^4.1.3"
} }
} }

1620
yarn.lock

File diff suppressed because it is too large Load diff