mirror of
https://github.com/KevinMidboe/seasoned.git
synced 2026-03-10 03:19:32 +00:00
Feat: vite & upgraded dependencies (#100)
* On every route change, update local variables from query params * ResultSection is keyed to query to force re-render * Resolved lint warnings * replace webpack w/ vite * update all imports with alias @ and scss * vite environment variables, also typed * upgraded eslint, defined new rules & added ignore comments * resolved linting issues * moved index.html to project root * updated dockerfile w/ build stage before runtime image definition * sign drone config
This commit is contained in:
67
eslint.config.mjs
Normal file
67
eslint.config.mjs
Normal file
@@ -0,0 +1,67 @@
|
||||
import path from "node:path";
|
||||
|
||||
import { includeIgnoreFile } from "@eslint/compat";
|
||||
import js from "@eslint/js";
|
||||
import { defineConfig } from "eslint/config";
|
||||
import { configs, plugins } from "eslint-config-airbnb-extended";
|
||||
import { rules as prettierConfigRules } from "eslint-config-prettier";
|
||||
import prettierPlugin from "eslint-plugin-prettier";
|
||||
|
||||
const CUSTOM_RULES = {
|
||||
"vue/no-v-model-argument": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
"vue/multi-word-component-names": "off",
|
||||
"no-shadow": "off",
|
||||
"@typescript-eslint/no-shadow": ["error"]
|
||||
};
|
||||
|
||||
const gitignorePath = path.resolve(".", ".gitignore");
|
||||
|
||||
// ESLint recommended config
|
||||
const jsConfig = defineConfig([
|
||||
{
|
||||
name: "js/config",
|
||||
...js.configs.recommended
|
||||
},
|
||||
plugins.stylistic,
|
||||
plugins.importX,
|
||||
...configs.base.recommended // Airbnb base recommended config
|
||||
]);
|
||||
|
||||
// Node & Airbnb recommended config
|
||||
const nodeConfig = defineConfig([plugins.node, ...configs.node.recommended]);
|
||||
|
||||
// Typescript & Airbnb base TS config
|
||||
const typescriptConfig = defineConfig([
|
||||
plugins.typescriptEslint,
|
||||
...configs.base.typescript
|
||||
]);
|
||||
|
||||
// Prettier config
|
||||
const prettierConfig = defineConfig([
|
||||
{
|
||||
name: "prettier/plugin/config",
|
||||
plugins: {
|
||||
prettier: prettierPlugin
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "prettier/config",
|
||||
rules: {
|
||||
...prettierConfigRules,
|
||||
"prettier/prettier": "error"
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
export default defineConfig([
|
||||
// Ignore files and folders listed in .gitignore
|
||||
includeIgnoreFile(gitignorePath),
|
||||
...jsConfig,
|
||||
...nodeConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
{
|
||||
rules: CUSTOM_RULES
|
||||
}
|
||||
]);
|
||||
Reference in New Issue
Block a user