Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeexcoin committed Sep 10, 2024
1 parent 6260a50 commit 4b5ee7c
Show file tree
Hide file tree
Showing 11 changed files with 2,223 additions and 1,143 deletions.
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 80
}
32 changes: 32 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import eslint from '@eslint/js';
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.stylistic,
{
plugins: {
'simple-import-sort': eslintPluginSimpleImportSort
},
rules: {
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
{
ignores: [
'node_modules/**',
'packages/**/dist/**'
],
},
);
21 changes: 16 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"private": true,
"scripts": {
"build": "pnpm run --r --filter \"./packages/**\" build"
},
"packageManager": "[email protected]"
"private": true,
"scripts": {
"build": "pnpm run --r --filter \"./packages/**\" build",
"lint:check": "eslint",
"lint:fix": "eslint --fix",
"prettier-format": "prettier --config .prettierrc './**/*.ts' --write",
"prettier-check": "prettier --config .prettierrc './**/*.ts' --check"
},
"packageManager": "[email protected]",
"devDependencies": {
"@types/eslint__js": "^8.42.3",
"eslint": "^9.10.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"prettier": "^3.3.3",
"typescript-eslint": "^8.5.0"
}
}
Loading

0 comments on commit 4b5ee7c

Please sign in to comment.