Add linter
This commit is contained in:
2
.eslintignore
Normal file
2
.eslintignore
Normal file
@@ -0,0 +1,2 @@
|
||||
dist
|
||||
build
|
||||
29
.eslintrc.json
Normal file
29
.eslintrc.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"globals": {},
|
||||
"env": {
|
||||
"commonjs": true,
|
||||
"es2021": true,
|
||||
"node": true
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"@matt-fidd"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest"
|
||||
},
|
||||
"rules": {
|
||||
"max-len": "off",
|
||||
"sort-imports": [
|
||||
"error",
|
||||
{
|
||||
"allowSeparatedGroups": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
2615
package-lock.json
generated
2615
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@@ -11,19 +11,26 @@
|
||||
"serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js",
|
||||
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/",
|
||||
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
|
||||
"generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema"
|
||||
"generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema",
|
||||
"lint:check": "eslint .",
|
||||
"lint:fix": "eslint --fix .",
|
||||
"lint": "npm run lint:check"
|
||||
},
|
||||
"dependencies": {
|
||||
"payload": "^1.0.9",
|
||||
"dotenv": "^8.2.0",
|
||||
"express": "^4.17.1"
|
||||
"express": "^4.17.1",
|
||||
"payload": "^1.0.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@matt-fidd/eslint-config": "^1.3.2",
|
||||
"@types/express": "^4.17.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
||||
"@typescript-eslint/parser": "^5.30.7",
|
||||
"copyfiles": "^2.4.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.20.0",
|
||||
"nodemon": "^2.0.6",
|
||||
"ts-node": "^9.1.1",
|
||||
"copyfiles": "^2.4.1",
|
||||
"typescript": "^4.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user