Skip to content

Commit

Permalink
refactor: eslint config, webpack update
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 4, 2024
1 parent ef72cf5 commit 0217768
Show file tree
Hide file tree
Showing 306 changed files with 6,326 additions and 5,057 deletions.
131 changes: 0 additions & 131 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,4 +1,4 @@
name: "\U0001F41E Bug report"
name: 🐞 Bug report
description: Create a report to help us improve
body:
- type: markdown
Expand Down
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/feature_request.yml
@@ -1,21 +1,21 @@
name: "\U0001F680 New feature proposal"
name: 🚀 New feature proposal
description: Suggest an idea for this project
labels: [":sparkles: feature request"]
labels: [':sparkles: feature request']
body:
- type: markdown
attributes:
value: |
**Before You Start...**
**Before You Start...**
This form is only for submitting feature requests. If you have a usage question
or are unsure if this is really a bug, make sure to:
This form is only for submitting feature requests. If you have a usage question
or are unsure if this is really a bug, make sure to:
- Read the [docs](https://devtools.vuejs.org/)
- Read the [FAQ](https://devtools.vuejs.org/guide/faq.html)
- Ask on [GitHub Discussions](https://github.com/vuejs/devtools/discussions)
- Ask on [Discord Chat](https://chat.vuejs.org/)
- Read the [docs](https://devtools.vuejs.org/)
- Read the [FAQ](https://devtools.vuejs.org/guide/faq.html)
- Ask on [GitHub Discussions](https://github.com/vuejs/devtools/discussions)
- Ask on [Discord Chat](https://chat.vuejs.org/)
Also try to search for your issue - another user may have already requested something similar!
Also try to search for your issue - another user may have already requested something similar!
- type: textarea
id: problem-description
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Expand Up @@ -3,7 +3,7 @@ name: Create release
on:
push:
tags:
- "v*"
- 'v*'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
@@ -1,3 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
}
3 changes: 2 additions & 1 deletion babel.config.js
Expand Up @@ -2,7 +2,8 @@ module.exports = {
root: true,
presets: [
[
'@babel/env', {
'@babel/env',
{
modules: false,
},
],
Expand Down
2 changes: 1 addition & 1 deletion cypress/.eslintrc.js
Expand Up @@ -3,7 +3,7 @@ module.exports = {
'cypress',
],
env: {
mocha: true,
'mocha': true,
'cypress/globals': true,
},
rules: {
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/example.json
Expand Up @@ -2,4 +2,4 @@
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
}
4 changes: 2 additions & 2 deletions cypress/integration/components-tab.js
Expand Up @@ -63,7 +63,7 @@ suite('components tab', () => {
cy.get('.data-el.props .data-field:nth-child(2)').contains('msg:"hi"')
cy.get('.data-el.props .data-field:nth-child(3)').contains('obj:undefined')
// Regexp
cy.get('.data-el.data .data-field:nth-child(8)').then(el => {
cy.get('.data-el.data .data-field:nth-child(8)').then((el) => {
expect(el.text()).to.include('regex:/(a\\w+b)/g')
})
// Literals
Expand Down Expand Up @@ -106,7 +106,7 @@ suite('components tab', () => {
.click({ force: true })
})
cy.get('.action-header .title').contains('Mine')
cy.get('.tree').then(el => {
cy.get('.tree').then((el) => {
expect(el.text()).to.include('<Mine>')
})
})
Expand Down
16 changes: 8 additions & 8 deletions cypress/integration/vuex-tab.js
Expand Up @@ -54,13 +54,13 @@ suite('vuex tab', () => {
.should('not.have.class', 'active')
cy.get('.recording-vuex-state').should('not.be.visible')
cy.get('.loading-vuex-state').should('not.be.visible')
cy.get('.vuex-state-inspector').then(el => {
cy.get('.vuex-state-inspector').then((el) => {
expect(el.text()).to.include('type:"INCREMENT"')
expect(el.text()).to.include('count:2')
expect(el.text()).to.include('Error from getter')
})
cy.get('.data-field .key').contains('lastCountPayload').click()
cy.get('.vuex-state-inspector').then(el => {
cy.get('.vuex-state-inspector').then((el) => {
expect(el.text()).to.include('a:1')
expect(el.text()).to.include('b:Object')
})
Expand Down Expand Up @@ -88,7 +88,7 @@ suite('vuex tab', () => {
cy.get('.recording-vuex-state').should('not.be.visible')
cy.get('.loading-vuex-state').should('not.be.visible')
cy.get('.recording-vuex-state').should('not.be.visible')
cy.get('.vuex-state-inspector').then(el => {
cy.get('.vuex-state-inspector').then((el) => {
expect(el.text()).to.include('type:"INCREMENT"')
expect(el.text()).to.include('count:1')
})
Expand All @@ -111,7 +111,7 @@ suite('vuex tab', () => {
cy.get('.history .entry[data-index="0"]')
.should('have.class', 'inspected')
.should('not.have.class', 'active')
cy.get('.vuex-state-inspector').then(el => {
cy.get('.vuex-state-inspector').then((el) => {
expect(el.text()).to.include('count:0')
})
cy.get('#target').iframe().then(({ get }) => {
Expand All @@ -133,7 +133,7 @@ suite('vuex tab', () => {
cy.get('.history .entry[data-index="4"]')
.should('have.class', 'inspected')
.should('have.class', 'active')
cy.get('.vuex-state-inspector').then(el => {
cy.get('.vuex-state-inspector').then((el) => {
expect(el.text()).to.include('count:2')
})
cy.get('#target').iframe().then(({ get }) => {
Expand All @@ -147,7 +147,7 @@ suite('vuex tab', () => {
cy.get('.history .entry[data-index="0"]')
.should('have.class', 'inspected')
.should('have.class', 'active')
cy.get('.vuex-state-inspector').then(el => {
cy.get('.vuex-state-inspector').then((el) => {
expect(el.text()).to.include('count:2')
})
cy.get('#target').iframe().then(({ get }) => {
Expand Down Expand Up @@ -204,9 +204,9 @@ suite('vuex tab', () => {
cy.wait(500)
cy.get('.message.invalid-json').should('not.be.visible')
cy.wait(500)
cy.get('.vuex-state-inspector').then(el => {
cy.get('.vuex-state-inspector').then((el) => {
expect(el.text()).to.include('count:42')
expect(el.text()).to.include('date:' + new Date('Fri Dec 22 2017 10:12:04 GMT+0100 (CET)'))
expect(el.text()).to.include(`date:${new Date('Fri Dec 22 2017 10:12:04 GMT+0100 (CET)')}`)
})
cy.get('.import').click()
cy.get('.import-state').should('not.be.visible')
Expand Down
2 changes: 1 addition & 1 deletion cypress/plugins/index.js
Expand Up @@ -11,7 +11,7 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

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

Expand Down
6 changes: 3 additions & 3 deletions cypress/support/commands.js
Expand Up @@ -25,22 +25,22 @@
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

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

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

const el = $iframe[0]
const iframeDoc = el.contentDocument || el.contentWindow.document
if (iframeDoc.readyState === 'complete') {
return Cypress.Promise.resolve({ body: $iframe.contents().find('body'), get })
}
return new Cypress.Promise(resolve => {
return new Cypress.Promise((resolve) => {
$iframe.on('load', () => {
resolve({ body: $iframe.contents().find('body'), get })
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/utils/suite.js
@@ -1,4 +1,4 @@
export function suite (description, tests) {
export function suite(description, tests) {
describe(description, () => {
before(() => {
cy.visit('/')
Expand Down
34 changes: 34 additions & 0 deletions eslint.config.js
@@ -0,0 +1,34 @@
const antfu = require('@antfu/eslint-config').default

module.exports = antfu({
ignores: [
'**/dist',
],
}, {
rules: {
'curly': ['error', 'all'],
'node/prefer-global/process': 'off',
},
}, {
files: [
'packages/shell-dev*/**',
],
rules: {
'no-console': 'off',
'unused-imports/no-unused-vars': 'off',
'vue/require-explicit-emits': 'off',
'vue/custom-event-name-casing': 'off',
'vue/no-deprecated-functional-template': 'off',
'vue/no-deprecated-filter': 'off',
'vue/no-unused-refs': 'off',
'vue/require-component-is': 'off',
'vue/return-in-computed-property': 'off',
},
}, {
files: [
'packages/shell-host/**',
],
rules: {
'no-console': 'off',
},
})

0 comments on commit 0217768

Please sign in to comment.