fix: update eslint rules

This commit is contained in:
Mythie
2023-08-30 12:35:43 +10:00
parent 7811035384
commit 2ba7df4881
7 changed files with 41 additions and 305 deletions

View File

@ -9,7 +9,7 @@ module.exports = {
'plugin:package-json/recommended',
],
plugins: ['prettier', 'package-json', 'simple-import-sort'],
plugins: ['prettier', 'package-json'],
env: {
node: true,
@ -35,6 +35,20 @@ module.exports = {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-duplicate-imports': 'error',
'no-multi-spaces': [
'error',
{
ignoreEOLComments: false,
exceptions: {
BinaryExpression: false,
VariableDeclarator: false,
ImportDeclaration: false,
Property: false,
},
},
],
// Safety with promises so we aren't running with scissors
'no-promise-executor-return': 'error',
'prefer-promise-reject-errors': 'error',
@ -53,18 +67,5 @@ module.exports = {
// To handle this we want this rule to catch usages and highlight them as
// warnings so we can write appropriate interfaces and guards later.
'@typescript-eslint/consistent-type-assertions': ['warn', { assertionStyle: 'never' }],
'no-multi-spaces': [
'error',
{
ignoreEOLComments: false,
exceptions: {
BinaryExpression: false,
VariableDeclarator: false,
ImportDeclaration: false,
Property: false,
},
},
],
'no-duplicate-imports': 'error',
},
};

View File

@ -10,12 +10,9 @@
"eslint-config-next": "13.4.12",
"eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^1.9.3",
"eslint-plugin-package-json": "^0.1.4",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"typescript": "^5.1.6"
},
"devDependencies": {
"eslint-plugin-package-json": "^0.1.4",
"eslint-plugin-simple-import-sort": "^10.0.0"
}
}

View File

@ -0,0 +1,5 @@
{
"extends": "@documenso/tsconfig/react-library.json",
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
}

View File

@ -5,7 +5,6 @@
"license": "MIT",
"dependencies": {
"autoprefixer": "^10.4.13",
"eslint": "7.32.0",
"postcss": "^8.4.21",
"tailwindcss": "^3.2.7",
"tailwindcss-animate": "^1.0.5"

View File

@ -1,4 +1,3 @@
import 'zod';
import { z } from 'zod';
export const ZSignUpMutationSchema = z.object({