Skip to content

Commit

Permalink
upgrade deps, pnpm, eslint, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
siner308 committed Oct 6, 2024
1 parent 4b57afb commit d126ef0
Show file tree
Hide file tree
Showing 60 changed files with 5,939 additions and 4,769 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

17 changes: 0 additions & 17 deletions .eslintrc.cjs

This file was deleted.

4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

eslint src
npm run build
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.1
20.11.1
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore artifacts:
node_modules
dist
build
6 changes: 1 addition & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
}
{}
28 changes: 28 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"plugins": [
"stylelint-scss",
"stylelint-prettier"
],
"extends": [
"stylelint-config-recommended",
"stylelint-config-concentric-order",
"stylelint-config-standard-scss",
"stylelint-prettier/recommended"
],
"rules": {
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind"
]
}
],
"prettier/prettier": [true, { "singleQuote": false }]
},
"ignoreFiles": [
"dist/**/*",
"build/**/*",
"node_modules/**/*"
]
}
57 changes: 57 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import stylisticTs from "@stylistic/eslint-plugin-ts";
import stylisticJsx from "@stylistic/eslint-plugin-jsx";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
),
{
settings: {
react: {
version: "detect",
},
},
plugins: {
"@stylistic/ts": stylisticTs,
"@stylistic/jsx": stylisticJsx,
},

languageOptions: {
parser: tsParser,
},

rules: {
"eol-last": "error",
"brace-style": ["error", "1tbs"],

"@stylistic/jsx/jsx-tag-spacing": [
"error",
{
beforeSelfClosing: "always",
},
],

"no-unused-vars": "off",
"react/prop-types": "off",
},

ignores: ["node_modules/*", "dist/*", "build/*"],
},
];
Loading

0 comments on commit d126ef0

Please sign in to comment.