Skip to content

Commit 0217768

Browse files
committed
refactor: eslint config, webpack update
1 parent ef72cf5 commit 0217768

File tree

306 files changed

+6326
-5057
lines changed

Some content is hidden

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

306 files changed

+6326
-5057
lines changed

.eslintrc.js

-131
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "\U0001F41E Bug report"
1+
name: 🐞 Bug report
22
description: Create a report to help us improve
33
body:
44
- type: markdown

.github/ISSUE_TEMPLATE/feature_request.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name: "\U0001F680 New feature proposal"
1+
name: 🚀 New feature proposal
22
description: Suggest an idea for this project
3-
labels: [":sparkles: feature request"]
3+
labels: [':sparkles: feature request']
44
body:
55
- type: markdown
66
attributes:
77
value: |
8-
**Before You Start...**
8+
**Before You Start...**
99
10-
This form is only for submitting feature requests. If you have a usage question
11-
or are unsure if this is really a bug, make sure to:
10+
This form is only for submitting feature requests. If you have a usage question
11+
or are unsure if this is really a bug, make sure to:
1212
13-
- Read the [docs](https://devtools.vuejs.org/)
14-
- Read the [FAQ](https://devtools.vuejs.org/guide/faq.html)
15-
- Ask on [GitHub Discussions](https://github.com/vuejs/devtools/discussions)
16-
- Ask on [Discord Chat](https://chat.vuejs.org/)
13+
- Read the [docs](https://devtools.vuejs.org/)
14+
- Read the [FAQ](https://devtools.vuejs.org/guide/faq.html)
15+
- Ask on [GitHub Discussions](https://github.com/vuejs/devtools/discussions)
16+
- Ask on [Discord Chat](https://chat.vuejs.org/)
1717
18-
Also try to search for your issue - another user may have already requested something similar!
18+
Also try to search for your issue - another user may have already requested something similar!
1919
2020
- type: textarea
2121
id: problem-description

.github/workflows/create-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Create release
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- 'v*'
77

88
jobs:
99
build:

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"typescript.tsdk": "node_modules/typescript/lib"
3-
}
3+
}

babel.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ module.exports = {
22
root: true,
33
presets: [
44
[
5-
'@babel/env', {
5+
'@babel/env',
6+
{
67
modules: false,
78
},
89
],

cypress/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
'cypress',
44
],
55
env: {
6-
mocha: true,
6+
'mocha': true,
77
'cypress/globals': true,
88
},
99
rules: {

cypress/fixtures/example.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"name": "Using fixtures to represent data",
33
"email": "[email protected]",
44
"body": "Fixtures are a great way to mock data for responses to routes"
5-
}
5+
}

cypress/integration/components-tab.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ suite('components tab', () => {
6363
cy.get('.data-el.props .data-field:nth-child(2)').contains('msg:"hi"')
6464
cy.get('.data-el.props .data-field:nth-child(3)').contains('obj:undefined')
6565
// Regexp
66-
cy.get('.data-el.data .data-field:nth-child(8)').then(el => {
66+
cy.get('.data-el.data .data-field:nth-child(8)').then((el) => {
6767
expect(el.text()).to.include('regex:/(a\\w+b)/g')
6868
})
6969
// Literals
@@ -106,7 +106,7 @@ suite('components tab', () => {
106106
.click({ force: true })
107107
})
108108
cy.get('.action-header .title').contains('Mine')
109-
cy.get('.tree').then(el => {
109+
cy.get('.tree').then((el) => {
110110
expect(el.text()).to.include('<Mine>')
111111
})
112112
})

cypress/integration/vuex-tab.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ suite('vuex tab', () => {
5454
.should('not.have.class', 'active')
5555
cy.get('.recording-vuex-state').should('not.be.visible')
5656
cy.get('.loading-vuex-state').should('not.be.visible')
57-
cy.get('.vuex-state-inspector').then(el => {
57+
cy.get('.vuex-state-inspector').then((el) => {
5858
expect(el.text()).to.include('type:"INCREMENT"')
5959
expect(el.text()).to.include('count:2')
6060
expect(el.text()).to.include('Error from getter')
6161
})
6262
cy.get('.data-field .key').contains('lastCountPayload').click()
63-
cy.get('.vuex-state-inspector').then(el => {
63+
cy.get('.vuex-state-inspector').then((el) => {
6464
expect(el.text()).to.include('a:1')
6565
expect(el.text()).to.include('b:Object')
6666
})
@@ -88,7 +88,7 @@ suite('vuex tab', () => {
8888
cy.get('.recording-vuex-state').should('not.be.visible')
8989
cy.get('.loading-vuex-state').should('not.be.visible')
9090
cy.get('.recording-vuex-state').should('not.be.visible')
91-
cy.get('.vuex-state-inspector').then(el => {
91+
cy.get('.vuex-state-inspector').then((el) => {
9292
expect(el.text()).to.include('type:"INCREMENT"')
9393
expect(el.text()).to.include('count:1')
9494
})
@@ -111,7 +111,7 @@ suite('vuex tab', () => {
111111
cy.get('.history .entry[data-index="0"]')
112112
.should('have.class', 'inspected')
113113
.should('not.have.class', 'active')
114-
cy.get('.vuex-state-inspector').then(el => {
114+
cy.get('.vuex-state-inspector').then((el) => {
115115
expect(el.text()).to.include('count:0')
116116
})
117117
cy.get('#target').iframe().then(({ get }) => {
@@ -133,7 +133,7 @@ suite('vuex tab', () => {
133133
cy.get('.history .entry[data-index="4"]')
134134
.should('have.class', 'inspected')
135135
.should('have.class', 'active')
136-
cy.get('.vuex-state-inspector').then(el => {
136+
cy.get('.vuex-state-inspector').then((el) => {
137137
expect(el.text()).to.include('count:2')
138138
})
139139
cy.get('#target').iframe().then(({ get }) => {
@@ -147,7 +147,7 @@ suite('vuex tab', () => {
147147
cy.get('.history .entry[data-index="0"]')
148148
.should('have.class', 'inspected')
149149
.should('have.class', 'active')
150-
cy.get('.vuex-state-inspector').then(el => {
150+
cy.get('.vuex-state-inspector').then((el) => {
151151
expect(el.text()).to.include('count:2')
152152
})
153153
cy.get('#target').iframe().then(({ get }) => {
@@ -204,9 +204,9 @@ suite('vuex tab', () => {
204204
cy.wait(500)
205205
cy.get('.message.invalid-json').should('not.be.visible')
206206
cy.wait(500)
207-
cy.get('.vuex-state-inspector').then(el => {
207+
cy.get('.vuex-state-inspector').then((el) => {
208208
expect(el.text()).to.include('count:42')
209-
expect(el.text()).to.include('date:' + new Date('Fri Dec 22 2017 10:12:04 GMT+0100 (CET)'))
209+
expect(el.text()).to.include(`date:${new Date('Fri Dec 22 2017 10:12:04 GMT+0100 (CET)')}`)
210210
})
211211
cy.get('.import').click()
212212
cy.get('.import-state').should('not.be.visible')

cypress/plugins/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// This function is called when a project is opened or re-opened (e.g. due to
1212
// the project's config changing)
1313

14-
module.exports = (on, config) => {
14+
module.exports = (_on, _config) => {
1515
// `on` is used to hook into various events Cypress emits
1616
// `config` is the resolved Cypress config
1717

cypress/support/commands.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@
2525
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
2626

2727
Cypress.Commands.add('vueCheckInit', () => {
28-
cy.get('.message .text').should('be.visible', { timeout: 10000 }).then(el => {
28+
cy.get('.message .text').should('be.visible', { timeout: 10000 }).then((el) => {
2929
expect(el.text()).to.include('Ready. Detected Vue')
3030
})
3131
cy.get('.instance').eq(0).contains('Root')
3232
})
3333

3434
// Add iframe support until becomes part of the framework
35-
Cypress.Commands.add('iframe', { prevSubject: 'element' }, $iframe => {
35+
Cypress.Commands.add('iframe', { prevSubject: 'element' }, ($iframe) => {
3636
const get = selector => cy.wait(500).wrap($iframe.contents().find(selector))
3737

3838
const el = $iframe[0]
3939
const iframeDoc = el.contentDocument || el.contentWindow.document
4040
if (iframeDoc.readyState === 'complete') {
4141
return Cypress.Promise.resolve({ body: $iframe.contents().find('body'), get })
4242
}
43-
return new Cypress.Promise(resolve => {
43+
return new Cypress.Promise((resolve) => {
4444
$iframe.on('load', () => {
4545
resolve({ body: $iframe.contents().find('body'), get })
4646
})

cypress/utils/suite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function suite (description, tests) {
1+
export function suite(description, tests) {
22
describe(description, () => {
33
before(() => {
44
cy.visit('/')

eslint.config.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const antfu = require('@antfu/eslint-config').default
2+
3+
module.exports = antfu({
4+
ignores: [
5+
'**/dist',
6+
],
7+
}, {
8+
rules: {
9+
'curly': ['error', 'all'],
10+
'node/prefer-global/process': 'off',
11+
},
12+
}, {
13+
files: [
14+
'packages/shell-dev*/**',
15+
],
16+
rules: {
17+
'no-console': 'off',
18+
'unused-imports/no-unused-vars': 'off',
19+
'vue/require-explicit-emits': 'off',
20+
'vue/custom-event-name-casing': 'off',
21+
'vue/no-deprecated-functional-template': 'off',
22+
'vue/no-deprecated-filter': 'off',
23+
'vue/no-unused-refs': 'off',
24+
'vue/require-component-is': 'off',
25+
'vue/return-in-computed-property': 'off',
26+
},
27+
}, {
28+
files: [
29+
'packages/shell-host/**',
30+
],
31+
rules: {
32+
'no-console': 'off',
33+
},
34+
})

0 commit comments

Comments
 (0)