Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Aug 8, 2024
1 parent 14b841d commit a8d5411
Show file tree
Hide file tree
Showing 17 changed files with 2,253 additions and 357 deletions.
202 changes: 0 additions & 202 deletions biome.json

This file was deleted.

2 changes: 1 addition & 1 deletion cssAsPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// cssAsPlugin.js
const postcss = require('postcss')
const postcssJs = require('postcss-js')
const { readFileSync } = require('fs')
const { readFileSync } = require('node:fs')

require.extensions['.css'] = function (module, filename) {
module.exports = ({ addBase, addComponents, addUtilities }) => {
Expand Down
60 changes: 60 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// @ts-check
import { defineConfig } from 'eslint-config-hyoban'

export default defineConfig(
{
formatting: false,
lessOpinionated: true,
ignores: [],
preferESM: false,
react: 'vite',
},
{
settings: {
tailwindcss: {
whitelist: ['center'],
},
},
rules: {
'package-json/valid-package-def': 'off',
'@eslint-react/no-missing-key': 'warn',
'no-restricted-syntax': 'off',
'import/no-anonymous-default-export': 'off',
eqeqeq: 'warn',
'no-console': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'off',
'no-empty': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'unicorn/prefer-query-selector': 0,
'regexp/no-super-linear-backtracking': 0,
'regexp/no-useless-assertions': 0,
'unicorn/no-new-array': 0,
'@typescript-eslint/method-signature-style': 0,
'unicorn/prefer-code-point': 'warn',
'unicorn/no-object-as-default-parameter': 'warn',
'unused-imports/no-unused-vars': 'warn',
'@eslint-react/no-unstable-default-props': 'warn',
'unicorn/prefer-regexp-test': 'warn',
'no-unsafe-optional-chaining': 'warn',
'unicorn/prefer-logical-operator-over-ternary': 'warn',
'arrow-body-style': 0,
'unicorn/no-array-callback-reference': 0,
'prefer-regex-literals': 0,
'regexp/optimal-quantifier-concatenation': 'warn',
'unicorn/prefer-string-slice': 0,
'array-callback-return': 0,
'regexp/no-unused-capturing-group': 1,
'unicorn/no-anonymous-default-export': 0,
'unicorn/no-magic-array-flat-depth': 1,
'react-refresh/only-export-components': 'error',
},
},

{
files: ['**/*/package.json', 'package.json'],
rules: {
'package-json/valid-package-def': 0,
'package-json/valid-name': 0,
},
},
)
45 changes: 23 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "vite-react-tailwind-template",
"version": "0.0.0",
"type": "module",
"version": "0.0.0",
"packageManager": "[email protected]",
"scripts": {
"prepare": "simple-git-hooks",
"dev": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"format": "prettier --write \"src/**/*.ts\" ",
"lint": "biome lint --apply src/**/*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json} --no-errors-on-unmatched"
},
"repository": {
"type": "git",
"url": "https://"
},
"scripts": {
"build": "tsc && vite build",
"dev": "vite",
"format": "prettier --write \"src/**/*.ts\" ",
"lint": "eslint --fix",
"prepare": "simple-git-hooks",
"serve": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "5.51.11",
"clsx": "2.1.1",
Expand All @@ -29,19 +29,7 @@
"sonner": "1.5.0",
"tailwind-merge": "2.4.0"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"prettier --ignore-path ./.gitignore --write "
],
"*.{js,ts,cjs,mjs,jsx,tsx,json}": [
"biome lint --apply --no-errors-on-unmatched"
]
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@egoist/tailwindcss-icons": "1.8.1",
"@iconify-json/mingcute": "1.1.18",
"@innei/prettier": "^0.14.0",
Expand All @@ -55,6 +43,8 @@
"autoprefixer": "10.4.19",
"click-to-react-component": "1.1.0",
"daisyui": "4.12.10",
"eslint": "9.8.0",
"eslint-config-hyoban": "3.1.0",
"lint-staged": "15.2.7",
"postcss": "8.4.40",
"postcss-import": "16.1.0",
Expand All @@ -69,5 +59,16 @@
"vite": "5.3.5",
"vite-plugin-checker": "0.7.2",
"vite-tsconfig-paths": "4.3.2"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"prettier --ignore-path ./.gitignore --write "
],
"*.{js,ts,cjs,mjs,jsx,tsx,json}": [
"eslint --fix"
]
}
}
}
Loading

0 comments on commit a8d5411

Please sign in to comment.