Skip to content

Commit 48f3385

Browse files
rohan-goelobulat
andauthored
Linting and code formatting (#321)
* added prettier and changed indent * added stylelint * added pre-commit * Improvements * Merge remote-tracking branch 'upstream/master' into Linting-and-formatting * Temporarily disable pre-commit hook to allow rebase * Re-enable pre-commit hook after merge * Lint merged files * Add comma-dangle multiline rule Co-authored-by: Olga Bulat <obulat@gmail.com>
1 parent 0a1eedc commit 48f3385

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+49223
-22831
lines changed

.editorconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ root = true
33
[*]
44
charset = utf-8
55
indent_style = space
6-
indent_size = 4
6+
indent_size = 2
77
end_of_line = lf
88
insert_final_newline = true
99
trim_trailing_whitespace = true
10+

.eslintrc.js

+40-30
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,43 @@
11
module.exports = {
2-
root: true,
3-
env: {
4-
node: true
2+
root: true,
3+
4+
env: {
5+
node: true,
6+
browser: true,
7+
},
8+
9+
rules: {
10+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
11+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
12+
indent: ['error', 2],
13+
'comma-dangle': ["error", "always-multiline"],
14+
'space-before-function-paren': ['warn', 'never'],
15+
'vue/require-default-prop': 'off',
16+
'vue/no-v-html': 'off',
17+
'vue/html-indent': ['error', 2],
18+
},
19+
20+
parserOptions: {
21+
parser: 'babel-eslint',
22+
},
23+
24+
overrides: [
25+
26+
{
27+
files: [
28+
'**/__tests__/*.{j,t}s?(x)',
29+
'**/tests/unit/**/*.spec.{j,t}s?(x)',
30+
],
31+
env: {
32+
jest: true,
33+
},
534
},
6-
extends: [
7-
'plugin:vue/recommended',
8-
'@vue/standard'
9-
],
10-
rules: {
11-
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
13-
indent: ['error', 4],
14-
'space-before-function-paren': ['warn', 'never'],
15-
'vue/require-default-prop': 'off',
16-
'vue/no-v-html': 'off',
17-
'vue/html-indent': ['error', 4]
18-
},
19-
parserOptions: {
20-
parser: 'babel-eslint'
21-
},
22-
overrides: [
23-
{
24-
files: [
25-
'**/__tests__/*.{j,t}s?(x)',
26-
'**/tests/unit/**/*.spec.{j,t}s?(x)'
27-
],
28-
env: {
29-
jest: true
30-
}
31-
}
32-
]
35+
],
36+
37+
extends: [
38+
'plugin:vue/recommended',
39+
'@vue/standard',
40+
'prettier',
41+
'prettier/vue',
42+
],
3343
}

0 commit comments

Comments
 (0)