chore: add ESLint setup with config, ignore file, and lint script
This commit is contained in:
8
.eslintignore
Normal file
8
.eslintignore
Normal file
@@ -0,0 +1,8 @@
|
||||
# dependencies:
|
||||
node_modules/
|
||||
|
||||
# build output:
|
||||
dist/
|
||||
|
||||
# test coverage output:
|
||||
coverage/
|
||||
16
.eslintrc.js
Normal file
16
.eslintrc.js
Normal file
@@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
es2021: true,
|
||||
node: true,
|
||||
jest: true
|
||||
},
|
||||
extends: "eslint:recommended",
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module"
|
||||
},
|
||||
rules: {
|
||||
// add custom rules or overrides here, e.g.:
|
||||
// "no-console": "warn"
|
||||
}
|
||||
};
|
||||
13
package.json
13
package.json
@@ -1,2 +1,11 @@
|
||||
.eslintrc.js
|
||||
.eslintignore
|
||||
{
|
||||
"name": "my-project",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user