Add eslint config

This commit is contained in:
Simon Warta
2022-01-12 23:19:09 +01:00
parent c6552a0baa
commit f6cd324367
3 changed files with 1783 additions and 13 deletions
+30
View File
@@ -0,0 +1,30 @@
module.exports = {
env: {
es6: true,
browser: true,
},
globals: {
process: "readonly",
},
parserOptions: {
sourceType: "module",
ecmaVersion: 8,
ecmaFeatures: {
jsx: true,
},
},
plugins: ["prettier"],
extends: ["eslint:recommended", "prettier", "plugin:prettier/recommended"],
rules: {
curly: ["warn", "multi-line", "consistent"],
"no-bitwise": "warn",
"no-console": "off",
"no-param-reassign": "warn",
"no-shadow": "warn",
"no-unused-vars": "warn",
"prefer-const": "warn",
radix: ["warn", "always"],
"spaced-comment": ["warn", "always"],
},
overrides: [],
};
+1744 -12
View File
File diff suppressed because it is too large Load Diff
+9 -1
View File
@@ -3,7 +3,9 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
"start": "next start",
"lint": "eslint --max-warnings 0 \"./**/*.js\"",
"lint:fix": "eslint --max-warnings 0 \"./**/*.js\" --fix"
},
"dependencies": {
"@cosmjs/amino": "^0.27.0",
@@ -21,5 +23,11 @@
"react": "^16.13.1",
"react-dom": "^16.13.1",
"uuid": "^8.3.0"
},
"devDependencies": {
"eslint": "^8.6.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.5.1"
}
}