init: correct .eslintrc and add .prettierrc
This commit is contained in:
16
.eslintrc
16
.eslintrc
@@ -8,12 +8,15 @@
|
|||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"requireConfigFile": false,
|
"requireConfigFile": false,
|
||||||
"babelOptions": {
|
"babelOptions": {
|
||||||
"presets": ["@babel/preset-react"]
|
"presets": [
|
||||||
|
"@babel/preset-react"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": [
|
||||||
"react-app",
|
"react-app",
|
||||||
"airbnb",
|
"airbnb",
|
||||||
|
"prettier",
|
||||||
"plugin:prettier/recommended"
|
"plugin:prettier/recommended"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
@@ -58,7 +61,12 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"import/no-extraneous-dependencies": ["warn", {"devDependencies": true}],
|
"import/no-extraneous-dependencies": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"devDependencies": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"no-unused-vars": "off",
|
"no-unused-vars": "off",
|
||||||
"no-console": "off",
|
"no-console": "off",
|
||||||
"no-use-before-define": "off",
|
"no-use-before-define": "off",
|
||||||
@@ -82,4 +90,4 @@
|
|||||||
"react/jsx-no-bind": "off",
|
"react/jsx-no-bind": "off",
|
||||||
"unused-imports/no-unused-imports": "warn"
|
"unused-imports/no-unused-imports": "warn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
15
.prettierrc
Normal file
15
.prettierrc
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"arrowParens": "always",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"jsxBracketSameLine": false,
|
||||||
|
"jsxSingleQuote": false,
|
||||||
|
"printWidth": 100,
|
||||||
|
"proseWrap": "always",
|
||||||
|
"quoteProps": "as-needed",
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"useTabs": false,
|
||||||
|
"endOfLine": "auto"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user