Skip to content

Commit

Permalink
Replace onelint with prettier, switch to 2 space indent
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Oct 20, 2018
1 parent f752c47 commit 4d3d9aa
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
testdata
lib/3rdparty
examples
node_modules
coverage
31 changes: 14 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
module.exports = {
extends: [
'onelint'
],
rules: {
'no-const-assign': 2
},
env: {
es6: true
},
parserOptions: {
ecmaVersion: 2017,
ecmaFeatures: {
experimentalObjectRestSpread: true

}
}
const config = {
extends: ['pretty-standard']
};

if (process.stdin.isTTY) {
// Enable plugin-prettier when running in a terminal. Allows us to have
// eslint verify prettier formatting, while not being bothered by it in our
// editors.
config.plugins = config.plugins || [];
config.plugins.push('prettier');
config.rules = config.rules || {};
config.rules['prettier/prettier'] = 'error';
}

module.exports = config;
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
"assetgraph": "5.4.0",
"coveralls": "^3.0.0",
"eslint": "5.7.0",
"eslint-config-onelint": "4.0.0",
"eslint-config-pretty-standard": "2.0.0",
"eslint-plugin-prettier": "3.0.0",
"istanbul": "^0.4.2",
"lodash.pluck": "3.1.2",
"mocha": "^5.1.0",
"prettier": "1.14.3",
"unexpected": "^10.26.0",
"urltools": "0.4.1"
},
Expand Down

0 comments on commit 4d3d9aa

Please sign in to comment.