Skip to content

Commit a36555e

Browse files
committed
chore(eslintrc): remove vuetify config and update eslint settings
1 parent 8f89066 commit a36555e

File tree

11 files changed

+49
-23
lines changed

11 files changed

+49
-23
lines changed

.eslintrc.js

+33-5
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,46 @@ module.exports = {
44
'jest/globals': true,
55
commonjs: true,
66
es6: true,
7-
node: true
7+
node: true,
88
},
9-
extends: ['vuetify'],
9+
extends: [
10+
'standard',
11+
'plugin:vue/recommended',
12+
],
1013
plugins: ['jest'],
1114
parserOptions: {
1215
ecmaVersion: 2018,
1316
parser: 'babel-eslint',
1417
sourceType: 'module',
1518
},
1619
rules: {
17-
'template-curly-spacing' : 'off',
20+
'comma-dangle': ['error', 'always-multiline'],
21+
'max-len': 'off',
22+
indent: 'off',
23+
// Workaround for ESLint failing to parse files with template literals
24+
// with this error: "TypeError: Cannot read property 'range' of null"
25+
'template-curly-spacing': 'off',
26+
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
27+
'vue/script-indent': ['error', 2, {
28+
baseIndent: 1,
29+
switchCase: 1,
30+
ignores: [],
31+
}],
32+
'vue/max-attributes-per-line': ['error', {
33+
singleline: 1,
34+
multiline: {
35+
max: 1,
36+
allowFirstLine: false,
37+
},
38+
}],
39+
'vue/html-closing-bracket-newline': ['error', {
40+
singleline: 'never',
41+
multiline: 'always',
42+
}],
43+
'vue/html-closing-bracket-spacing': 'error',
44+
'vue/no-unused-components': 'warn',
45+
'vue/no-unused-vars': 'warn',
46+
'vue/no-v-html': 'off',
1847
'vue/require-default-prop': 'off',
19-
indent : 'off'
20-
}
48+
},
2149
}

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"babel-eslint": "^10.1.0",
1818
"eslint": "^7.0.0",
1919
"eslint-config-standard": "^14.1.1",
20-
"eslint-config-vuetify": "^0.6.0",
2120
"eslint-plugin-import": "^2.20.2",
2221
"eslint-plugin-jest": "^23.13.1",
2322
"eslint-plugin-node": "^11.1.0",

packages/@vuetify/presets/generator/templates/base/src/layouts/default/AppBar.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<script>
1010
// Utilities
11-
import { sync } from 'vuex-pathify'
11+
import { sync } from 'vuex-pathify'
1212
1313
export default {
1414
name: 'DefaultAppBar',

packages/@vuetify/presets/generator/templates/base/src/router/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export default new Router({
3232
{
3333
path: '',
3434
name: 'Default',
35-
component: () => import('@/views/home')
35+
component: () => import('@/views/home'),
3636
},
37-
]
38-
}
39-
]
37+
],
38+
},
39+
],
4040
})

packages/@vuetify/presets/generator/templates/base/src/store/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Vue.use(Vuex)
2222

2323
export default new Vuex.Store({
2424
modules,
25-
plugins: [pathify.plugin]
25+
plugins: [pathify.plugin],
2626
})
2727

2828
// A reusable const for making root commits and dispatches

packages/@vuetify/presets/generator/templates/base/src/store/modules/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { make } from 'vuex-pathify'
33

44
// Data
55
const state = {
6-
drawer: null
6+
drawer: null,
77
}
88

99
const mutations = make.mutations(state)

packages/@vuetify/presets/prompts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = [
66
choices: [
77
{
88
name: 'Base (A basic Vuetify project)',
9-
value: 'base'
9+
value: 'base',
1010
},
1111
{
1212
name: 'Essential (Coming soon)',
@@ -15,5 +15,5 @@ module.exports = [
1515
},
1616
],
1717
default: 'base',
18-
}
18+
},
1919
]

packages/vue-cli-plugin-vuetify-storybook/generator/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = api => {
66
api.extendPackage({
77
scripts: {
88
'serve:storybook': 'start-storybook -p 6006',
9-
"build:storybook": "build-storybook",
9+
'build:storybook': 'build-storybook',
1010
},
1111
devDependencies: {
1212
'@babel/preset-react': '^7.6.3',
@@ -21,7 +21,7 @@ module.exports = api => {
2121
'babel-preset-vue': '^2.0.2',
2222
'prism-react-renderer': '^0.1.7',
2323
'js-beautify': '^1.11.0',
24-
'prismjs': '^1.17.1',
24+
prismjs: '^1.17.1',
2525
'vue-storybook': '^1.1.0',
2626
},
2727
})

packages/vue-cli-plugin-vuetify/generator/tools/vuetify.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Imports
2-
const fs = require('fs')
32
const helpers = require('./helpers')
43

54
function addDependencies (api) {

packages/vue-cli-plugin-vuetify/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ module.exports = (api) => {
2626
.rule('vue')
2727
.use('vue-loader')
2828
.tap(options => {
29-
const transformAssetUrls = options.transformAssetUrls || {};
30-
29+
const transformAssetUrls = options.transformAssetUrls || {}
30+
3131
return ({
3232
...options,
3333
transformAssetUrls: {
@@ -39,7 +39,7 @@ module.exports = (api) => {
3939
'v-navigation-drawer': 'src',
4040
'v-parallax': 'src',
4141
'v-toolbar': 'src',
42-
...transformAssetUrls
42+
...transformAssetUrls,
4343
},
4444
})
4545
})

packages/vue-cli-plugin-vuetify/util/helpers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ function mergeRules (api, opt, ext) {
6161

6262
opt.prependData = data.join('\n')
6363
} else {
64-
if (opt.additionalData) data.unshift(opt.additionalData);
64+
if (opt.additionalData) data.unshift(opt.additionalData)
6565

66-
opt.additionalData = data.join('\n');
66+
opt.additionalData = data.join('\n')
6767
}
6868
return opt
6969
}

0 commit comments

Comments
 (0)