Skip to content

Commit 8855f1a

Browse files
committed
Replace onelint with prettier
1 parent 0475fea commit 8855f1a

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed

.editorconfig

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
14
root = true
25

36
[*]
47
end_of_line = lf
8+
charset = utf-8
59
insert_final_newline = true
6-
indent_size = 4
10+
trim_trailing_whitespace = true
711
indent_style = space
8-
9-
[Makefile]
10-
indent_style = tab
11-
12-
[*.json]
1312
indent_size = 2

.eslintrc.js

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
module.exports = {
2-
extends: [
3-
'onelint'
4-
]
1+
const config = {
2+
extends: ['pretty-standard']
53
};
4+
5+
if (process.stdin.isTTY) {
6+
// Enable plugin-prettier when running in a terminal. Allows us to have
7+
// eslint verify prettier formatting, while not being bothered by it in our
8+
// editors.
9+
config.plugins = config.plugins || [];
10+
config.plugins.push('prettier');
11+
config.rules = config.rules || {};
12+
config.rules['prettier/prettier'] = 'error';
13+
}
14+
15+
module.exports = config;

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package.json

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
"devDependencies": {
1616
"coveralls": "^3.0.0",
1717
"eslint": "^5.1.0",
18-
"eslint-config-onelint": "^4.0.0",
18+
"eslint-config-pretty-standard": "^2.0.0",
19+
"eslint-plugin-prettier": "^3.0.0",
1920
"istanbul": "^0.4.5",
2021
"magicpen": "^5.12.0",
2122
"mocha": "^5.1.5",
23+
"prettier": "^1.15.2",
2224
"unexpected": "^10.3.1",
2325
"unexpected-documentation-site-generator": "^5.0.0",
2426
"unexpected-markdown": "^1.3.2"

0 commit comments

Comments
 (0)