-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.js
68 lines (58 loc) · 2.17 KB
/
nuxt.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
module.exports = {
env: {
browser: true,
node: true
},
parserOptions: {
ecmaFeatures: {
legacyDecorators: true,
},
},
extends: [
"@nuxtjs/eslint-config-typescript"
],
// add your custom rules here
rules: {
// Prevent console from being used in production
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
// Enforce use of comma
// https://eslint.org/docs/rules/comma-dangle#always-multiline
"comma-dangle": ["error", "always-multiline"],
// https://eslint.org/docs/rules/object-curly-newline#consistent
"object-curly-newline": ["error", { "consistent": true }],
// https://eslint.org/docs/rules/curly#consistent
"curly": ["error", "multi", "consistent"],
// Enforce use of semicolons
// https://eslint.org/docs/rules/semi#omitlastinonelineblock
"semi": ["error", "always", { "omitLastInOneLineBlock": true }],
// https://eslint.org/docs/rules/max-len
"max-len": ["error", { code: 150 }],
// Structure module imports
"import/order": ["error", {
"pathGroups": [
{
pattern: "@/composables/**",
group: "external",
position: "after"
},
{
pattern: '@/components/**',
group: 'external',
position: 'after',
},
],
"newlines-between": "always"
}],
// https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/no-v-html.md
"vue/no-v-html": "off",
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md
"@typescript-eslint/explicit-function-return-type": "off",
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-ts-ignore.md
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-ts-ignore": "off",
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
"@typescript-eslint/no-unused-vars": "warn",
"no-unused-vars": "off",
}
}