Initial commit
This commit is contained in:
commit
28ec24b2c2
26 changed files with 4372 additions and 0 deletions
72
eslint.config.js
Normal file
72
eslint.config.js
Normal file
|
@ -0,0 +1,72 @@
|
|||
// @ts-check
|
||||
|
||||
import eslint from "@eslint/js";
|
||||
import tsparser from "@typescript-eslint/parser";
|
||||
import eslintConfigPrettier from "eslint-config-prettier";
|
||||
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
||||
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
||||
import solid from "eslint-plugin-solid/configs/typescript";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default tseslint.config([
|
||||
eslint.configs.recommended,
|
||||
// tseslint.configs.recommendedTypeChecked,
|
||||
// tseslint.configs.strictTypeChecked,
|
||||
// tseslint.configs.stylisticTypeChecked,
|
||||
eslintPluginPrettierRecommended,
|
||||
eslintConfigPrettier,
|
||||
{
|
||||
...solid,
|
||||
languageOptions: {
|
||||
parser: tsparser,
|
||||
// Specifies the ESLint parser
|
||||
parserOptions: {
|
||||
ecmaVersion: 2024,
|
||||
// Allows for the parsing of modern ECMAScript features
|
||||
sourceType: "module",
|
||||
// Allows for the use of imports
|
||||
ecmaFeatures: {
|
||||
jsx: true, // Allows for the parsing of JSX
|
||||
},
|
||||
project: "./tsconfig.json",
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
|
||||
plugins: {
|
||||
"simple-import-sort": simpleImportSort,
|
||||
},
|
||||
rules: {
|
||||
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
|
||||
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
|
||||
"simple-import-sort/imports": [
|
||||
"error",
|
||||
{
|
||||
groups: [
|
||||
// solidjs
|
||||
["^solid-(js|start)", "^@solidjs/"],
|
||||
["^@?\\w"],
|
||||
// components imports
|
||||
["^~/components/?"],
|
||||
// other /src imports
|
||||
["^~/"],
|
||||
// Parent imports. Put `..` last.
|
||||
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
|
||||
// Other relative imports. Put same-folder imports and `.` last.
|
||||
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
|
||||
// types imports
|
||||
["^~/types$"],
|
||||
// Side effect imports.
|
||||
["^\\u0000"],
|
||||
// Style imports.
|
||||
["^.+\\.?(s?css)$"],
|
||||
],
|
||||
},
|
||||
],
|
||||
"simple-import-sort/exports": "error",
|
||||
// "@typescript-eslint/consistent-type-imports": "error",
|
||||
// "@typescript-eslint/consistent-type-exports": "error",
|
||||
},
|
||||
},
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue