set eslint prettier rule to error level

This commit is contained in:
Aleksey Gurianov
2018-07-07 01:19:18 +04:00
parent 2df3aa01d4
commit dcd97a9df7
2 changed files with 8 additions and 18 deletions
+4 -12
View File
@@ -1,15 +1,7 @@
module.exports = {
parser: 'babel-eslint',
extends: [
'eslint:recommended',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
],
plugins: [
'react',
'jsx-a11y',
'prettier',
],
extends: ['eslint:recommended', 'plugin:jsx-a11y/recommended', 'plugin:prettier/recommended'],
plugins: ['react', 'jsx-a11y', 'prettier'],
env: {
browser: true,
node: true,
@@ -20,7 +12,7 @@ module.exports = {
ecmaFeatures: {
modules: true,
jsx: true,
}
},
},
globals: {
remark_config: true,
@@ -61,6 +53,6 @@ module.exports = {
'no-var': 2,
'object-shorthand': 2,
'prefer-arrow-callback': 2,
'prettier/prettier': 1,
'prettier/prettier': 2,
},
};
+4 -6
View File
@@ -4,19 +4,17 @@
"scripts": {
"build": "cross-env NODE_ENV=production webpack --config ./webpack.config.js",
"start": "webpack-dev-server --progress --hot --inline --config ./webpack.config.js",
"reinstall": "rm -rf ./node_modules/ && npm install",
"lint": "eslint --ext=.js,.jsx .",
"test": "jest",
"prettier": "prettier --write \"./**/*.{js,jsx,scss}\"",
"precommit": "./node_modules/.bin/lint-staged"
},
"lint-staged": {
"./app/**/*.{js,jsx}": [
"prettier --write",
"git add",
"eslint --fix"
"./**/*.{js,jsx}": [
"eslint --fix",
"git add"
],
"./app/**/*.scss": [
"./**/*.scss": [
"prettier --write",
"git add"
]