Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
// }
11 changes: 5 additions & 6 deletions cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'
import "./commands";

// Alternatively you can use CommonJS syntax:
// require('./commands')

import { mount } from 'cypress/vue2'
import { mount } from "cypress/vue2";

// Augment the Cypress namespace to include type definitions for
// your custom command.
Expand All @@ -28,12 +27,12 @@ import { mount } from 'cypress/vue2'
declare global {
namespace Cypress {
interface Chainable {
mount: typeof mount
mount: typeof mount;
}
}
}

Cypress.Commands.add('mount', mount)
Cypress.Commands.add("mount", mount);

// Example use:
// cy.mount(MyComponent)
// cy.mount(MyComponent)
73 changes: 73 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// @ts-check
import eslint from "@eslint/js";
import gitignore from "eslint-config-flat-gitignore";
import { flatConfigs as importConfigs } from "eslint-plugin-import";
import prettierPlugin from "eslint-plugin-prettier/recommended";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import pluginVue from "eslint-plugin-vue";
import globals from "globals";
import tseslint from "typescript-eslint";

import viteConfig from "./vite.config.js";

export default tseslint.config(
gitignore(),
{
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs["flat/recommended"],
importConfigs.recommended,
importConfigs.typescript,
],
files: ["**/*.{js,ts,vue}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: globals.browser,
parserOptions: {
parser: tseslint.parser,
},
},
plugins: {
"simple-import-sort": simpleImportSort,
},
settings: {
"import/resolver": {
vite: {
viteConfig,
},
},
},
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"simple-import-sort/imports": "error",
"import/no-duplicates": "error",
"import/no-unresolved": "off",
},
},
{
files: ["**/__tests__/*.{j,t}s?(x)", "**/tests/unit/**/*.spec.{j,t}s?(x)"],

languageOptions: {
globals: {
...globals.jest,
},
},
},
{
files: ["**/*.js"],
extends: [tseslint.configs.disableTypeChecked],
rules: {
// turn off other type-aware rules
"other-plugin/typed-rule": "off",

// turn off rules that don't apply to JS code
"@typescript-eslint/explicit-function-return-type": "off",
},
},
prettierPlugin,
);
6 changes: 3 additions & 3 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
preset: "ts-jest",
testEnvironment: "node",
};
Loading