chore(lint): Configure linter and prettier

This commit is contained in:
Baboo7 2022-06-24 11:00:11 +02:00
parent 382471cea0
commit 4f250af7f3
7 changed files with 1496 additions and 5 deletions

10
.eslintignore Normal file
View File

@ -0,0 +1,10 @@
**/*.svg
**/*.png
**/*.snap
**/*.txt
**/*.otf
**/*.ttf
**/*.css
build
coverage
node_modules

36
.eslintrc.json Normal file
View File

@ -0,0 +1,36 @@
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"presets": ["@babel/preset-react"]
},
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"extends": ["eslint:recommended", "plugin:react/recommended"],
"env": {
"commonjs": true,
"es6": true,
"browser": true,
"node": true
},
"globals": {
"strapi": true
},
"rules": {
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"linebreak-style": ["error", "unix"],
"no-console": 0,
"semi": ["error", "always"],
"no-unused-vars": 1,
"react/prop-types": 0
}
}

10
.prettierignore Normal file
View File

@ -0,0 +1,10 @@
**/*.svg
**/*.png
**/*.snap
**/*.txt
**/*.otf
**/*.ttf
**/*.css
coverage
build
node_modules

5
.prettierrc Normal file
View File

@ -0,0 +1,5 @@
trailingComma: 'all'
tabWidth: 2
semi: true
singleQuote: true
printWidth: 180

1
babel.config.js Normal file
View File

@ -0,0 +1 @@
module.exports = {};

View File

@ -8,11 +8,25 @@
"kind": "plugin",
"displayName": "Import Export Entries"
},
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prettier:check": "yarn prettier --check .",
"prettier:write": "yarn prettier --write ."
},
"dependencies": {
"@monaco-editor/react": "4.4.5",
"csvtojson": "2.0.10",
"react-singleton-hook": "3.3.0"
},
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/eslint-parser": "^7.18.2",
"@babel/preset-react": "^7.17.12",
"eslint": "^8.18.0",
"eslint-plugin-react": "^7.30.1",
"prettier": "^2.7.1"
},
"peerDependencies": {
"@strapi/strapi": "^4.0.0"
},

1425
yarn.lock

File diff suppressed because it is too large Load Diff