Skip to content

Commit

Permalink
use eslint-config-prettier for less mess between prettier/eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
maelvls committed Jun 15, 2018
1 parent b0adc6d commit cbb68d6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
48 changes: 26 additions & 22 deletions touist-ide/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,43 @@ module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
sourceType: 'module',
},
env: {
browser: true,
},
extends: 'airbnb-base',
extends: ['airbnb-base', 'prettier'],
// required to lint *.vue files
plugins: [
'vue',
'html'
],
plugins: ['vue', 'html'],
// check if imports actually resolve
'settings': {
settings: {
'import/resolver': {
'webpack': {
'config': 'build/webpack.base.conf.js'
}
}
webpack: {
config: 'build/webpack.base.conf.js',
},
},
},
// add your custom rules here
'rules': {
rules: {
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
'js': 'never',
'vue': 'never'
}],
'import/extensions': [
'error',
'always',
{
js: 'never',
vue: 'never',
},
],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
'optionalDependencies': ['test/unit/index.js']
}],
'import/no-extraneous-dependencies': [
'error',
{
optionalDependencies: ['test/unit/index.js'],
},
],
'no-param-reassign': 'off',
'no-plusplus': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
}
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
},
};
2 changes: 1 addition & 1 deletion touist-ide/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"singleQuote": true,
"proseWrap": "always",
"printWidth": 80,
"arrowParens": "avoid"
"arrowParens": "always"
}
1 change: 1 addition & 0 deletions touist-ide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"css-loader": "^0.28.0",
"eslint": "^3.19.0",
"eslint-config-airbnb-base": "^11.3.0",
"eslint-config-prettier": "^2.9.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-loader": "^1.7.1",
Expand Down

0 comments on commit cbb68d6

Please sign in to comment.