Skip to content

Commit

Permalink
Add prettier!
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Jan 27, 2019
1 parent 919c867 commit 217405b
Show file tree
Hide file tree
Showing 4 changed files with 433 additions and 35 deletions.
34 changes: 13 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,43 @@ module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
sourceType: 'module',
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
plugins: ['ember', 'prettier'],
extends: ['eslint:recommended', 'plugin:ember/recommended', 'prettier'],
env: {
browser: true
browser: true,
},
rules: {
'prettier/prettier': 'error',
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
'tests/dummy/config/**/*.js',
],
excludedFiles: ['addon/**', 'addon-test-support/**', 'app/**', 'tests/dummy/app/**'],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
ecmaVersion: 2015,
},
env: {
browser: false,
node: true
node: true,
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
}),
},
],
};
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
trailingComma: 'es5',
printWidth: 100,
};
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@
"ember-source": "~3.7.2",
"ember-source-channel-url": "^1.1.0",
"ember-try": "^1.0.0",
"eslint": "^5.12.1",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-ember": "^5.2.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-prettier": "^3.0.1",
"loader.js": "^4.7.0",
"prettier": "^1.16.1",
"qunit-dom": "^0.8.0"
},
"engines": {
Expand Down
Loading

0 comments on commit 217405b

Please sign in to comment.