diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 7b9c661..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "semi": true, - "trailingComma": "all", - "singleQuote": true, - "printWidth": 90 -} diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..1097462 --- /dev/null +++ b/biome.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.1.3/schema.json", + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "tab", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 90 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "suspicious": { + "noConsole": "off" + }, + "nursery": { + "noShadow": "off" + }, + "style": { + "noNamespace": "off" + }, + "complexity": { + "noUselessEmptyExport": "off", + "useArrowFunction": "off" + } + } + }, + "assist": { + "actions": { + "source": { + "organizeImports": "on" + } + } + }, + "javascript": { + "formatter": { + "quoteStyle": "single", + "trailingCommas": "all", + "semicolons": "always", + "arrowParentheses": "asNeeded" + } + }, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "files": { + "ignoreUnknown": false, + "includes": [ + "**", + "!**/node_modules/**", + "!**/dist/**", + "!**/browser/**", + "!**/es/**", + "!**/lib/**", + "!**/__tests__/**" + ] + } +} diff --git a/package.json b/package.json index 11a479f..f0bcbe7 100644 --- a/package.json +++ b/package.json @@ -12,19 +12,11 @@ "scripts": { "build": "rollup -c --environment BUILD:production", "dev": "rollup -c -w --environment BUILD:development", - "fmt": "prettier --write 'src/**/*.{ts,tsx,css}' *.{js,json,md} && npm run lint:fix", - "lint": "tslint -t verbose -c tslint.json 'src/**/*.{ts,tsx}'", - "lint:fix": "tslint -t verbose -c tslint.json --fix 'src/**/*.{ts,tsx}'", - "lint:staged": "pretty-quick --staged && lint-staged", "test": "jest", "security": "npm audit" }, - "lint-staged": { - "*.{ts,tsx}": "npm run fmt" - }, "husky": { "hooks": { - "pre-commit": "npm run lint:staged", "pre-push": "npm run test" } }, @@ -41,6 +33,7 @@ "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" }, "devDependencies": { + "@biomejs/biome": "2.1.3", "@commitlint/cli": "^15.0.0", "@commitlint/config-conventional": "^15.0.0", "@rollup/plugin-replace": "^2.3.1", @@ -49,13 +42,9 @@ "@types/jest": "^25.2.3", "@types/react": "^16.9.26", "autoprefixer": "^9.7.5", - "eslint": "^6.8.0", "husky": "^4.2.3", "jest": "^25.2.7", "jest-transform-css": "^2.0.0", - "lint-staged": "^10.0.9", - "prettier": "^2.0.2", - "pretty-quick": "^2.0.1", "react": "^16.13.1", "react-dom": "^16.13.1", "rollup": "^2.3.3", @@ -64,9 +53,6 @@ "rollup-plugin-terser": "^5.3.0", "rollup-plugin-typescript2": "^0.27.0", "ts-jest": "^25.3.1", - "tslint": "^6.1.0", - "tslint-plugin-prettier": "^2.3.0", - "tslint-react-hooks": "^2.2.2", "typescript": "4.2.3" }, "sideEffects": false, diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 98b8577..0000000 --- a/tslint.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": ["tslint:recommended", "tslint-react-hooks"], - "jsRules": { - "trailing-comma": false - }, - "rules": { - "interface-name": [true, "never-prefix"], - "no-console": false, - "no-shadowed-variable": false, - "arrow-parens": false, - "trailing-comma": false, - "member-access": [true, "no-public"], - "callable-types": false, - "no-empty-interface": false, - "only-arrow-functions": false, - "variable-name": [true, "allow-leading-underscore", "allow-pascal-case"], - "object-literal-sort-keys": false - }, - "rulesDirectory": [], - "linterOptions": { - "exclude": ["./**/node_modules/**"] - } -}