0
0
Fork 0

Updated eslint configuration

This commit is contained in:
Joan Sanchez 2022-02-25 13:12:14 +01:00
parent 25e8ed8a06
commit 01a9747339
13 changed files with 128 additions and 120 deletions

View File

@ -1,31 +1,31 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/prettier/@typescript-eslint",
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)",
],
env: {
jest: true,
},
root: true,
env: {
node: true,
},
],
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/typescript/recommended",
"@vue/prettier",
"@vue/prettier/@typescript-eslint",
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)",
],
env: {
jest: true,
},
},
],
};

6
.prettierrc.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
singleQuote: true,
printWidth: 120,
tabWidth: 4,
endOfLine: "auto",
};

View File

@ -1,16 +1,9 @@
{
"eslint.validate": [
"javascript",
"typescript",
"vue",
"html",
"scss",
"json",
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
},
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": true,
"files.eol": "\n",
"editor.tabSize": 4,
}

View File

@ -1,3 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
presets: ['@vue/cli-plugin-babel/preset'],
};

View File

@ -1,3 +1,3 @@
{
"pluginsFile": "tests/e2e/plugins/index.js"
}
"pluginsFile": "tests/e2e/plugins/index.js"
}

View File

@ -1,6 +1,6 @@
module.exports = {
preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel",
transform: {
"^.+\\.vue$": "vue-jest",
},
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
transform: {
'^.+\\.vue$': 'vue-jest',
},
};

View File

@ -1,17 +1,23 @@
<!DOCTYPE html>
<html lang="">
<head>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
</body>
</html>

View File

@ -1,12 +1,8 @@
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import { Quasar } from "quasar";
import quasarUserOptions from "./quasar-user-options";
import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import { Quasar } from 'quasar';
import quasarUserOptions from './quasar-user-options';
createApp(App)
.use(Quasar, quasarUserOptions)
.use(store)
.use(router)
.mount("#app");
createApp(App).use(Quasar, quasarUserOptions).use(store).use(router).mount('#app');

View File

@ -1,11 +1,11 @@
import "./styles/quasar.scss";
import lang from "quasar/lang/es.js";
import "@quasar/extras/roboto-font/roboto-font.css";
import "@quasar/extras/material-icons/material-icons.css";
import './styles/quasar.scss';
import lang from 'quasar/lang/es.js';
import '@quasar/extras/roboto-font/roboto-font.css';
import '@quasar/extras/material-icons/material-icons.css';
// To be used on app.use(Quasar, { ... })
export default {
config: {},
plugins: {},
lang: lang,
config: {},
plugins: {},
lang: lang,
};

6
src/shims-vue.d.ts vendored
View File

@ -1,6 +1,6 @@
/* eslint-disable */
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

View File

@ -1,8 +1,8 @@
import { createStore } from "vuex";
import { createStore } from 'vuex';
export default createStore({
state: {},
mutations: {},
actions: {},
modules: {},
state: {},
mutations: {},
actions: {},
modules: {},
});

View File

@ -1,41 +1,41 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env",
"jest"
],
"paths": {
"@/*": [
"src/*"
]
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env",
"jest"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}
}

View File

@ -1,9 +1,16 @@
module.exports = {
pluginOptions: {
quasar: {
importStrategy: "kebab",
rtlSupport: false,
pluginOptions: {
quasar: {
importStrategy: 'kebab',
rtlSupport: false,
},
},
},
transpileDependencies: ["quasar"],
css: {
loaderOptions: {
sass: {
additionalData: `@import "@/styles/quasar.variables.scss";`,
},
},
},
transpileDependencies: ['quasar'],
};