New rules

This commit is contained in:
Alex 2024-04-19 21:54:02 -04:00
parent fb50ede688
commit 003a43512c
9 changed files with 19 additions and 16 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
!/packages/eslint-plugin-react-hooks !/packages/eslint-plugin-react-hooks
/react /react
src/types/rules
dist/**/*.js dist/**/*.js
dist/**/*.js.map dist/**/*.js.map

4
dist/package.json vendored
View File

@ -1,6 +1,6 @@
{ {
"name": "@aet/eslint-rules", "name": "@aet/eslint-rules",
"version": "0.0.24-beta.1", "version": "0.0.24-beta.3",
"license": "UNLICENSED", "license": "UNLICENSED",
"peerDependencies": { "peerDependencies": {
"eslint": "^8.57.0", "eslint": "^8.57.0",
@ -57,4 +57,4 @@
"supports-preserve-symlinks-flag": "file:./overrides/supports-preserve-symlinks-flag" "supports-preserve-symlinks-flag": "file:./overrides/supports-preserve-symlinks-flag"
} }
} }
} }

@ -1 +1 @@
Subproject commit 7b6bfc39474817efda02d186349523bb2bd569cf Subproject commit 7a02ac08b5aaac8c217f0e87142f97eafcc38fbc

@ -1 +1 @@
Subproject commit 6b95a021938139726b3f862beb37012d6e2afab2 Subproject commit f77ceb679d59ced5d9a633123385470a9eea10d9

@ -1 +1 @@
Subproject commit fffb05b38c8eee926ee758e9ceb9eae4e697fbdd Subproject commit 0d5321a5457c5f0da0ca216053cc5b4f571b53ae

@ -1 +1 @@
Subproject commit 47cd9a6a0e360d10d50e27a01123169dec00d40b Subproject commit eb11b5b35a6a797dc7fba6df53b1c4dada3a2a55

@ -1 +1 @@
Subproject commit ecadb92609998520be80d64c0bd6bc5e05934aa9 Subproject commit 4467db503e38b9356517cf6926d11be544ccf4b1

View File

@ -167,13 +167,7 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig {
}, },
overrides: [ overrides: [
{ {
files: [ files: ['.eslintrc.js', '.eslintrc.cjs', '*.config.js', 'index.js'],
'.eslintrc.js',
'*.config.js',
'index.js',
'babel.config.js',
'next.config.js',
],
extends: ['plugin:@typescript-eslint/disable-type-checked'], extends: ['plugin:@typescript-eslint/disable-type-checked'],
rules: { rules: {
'rules/restrict-template-expressions': off, 'rules/restrict-template-expressions': off,
@ -186,7 +180,7 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig {
}, },
}, },
{ {
files: ['repl.ts'], files: ['repl.ts', 'scripts/**/*.ts'],
rules: { rules: {
'no-console': off, 'no-console': off,
}, },

View File

@ -42,7 +42,15 @@ export const eslintRules: Partial<EslintRules> = {
'prefer-spread': warn, 'prefer-spread': warn,
'quote-props': [error, 'as-needed'], 'quote-props': [error, 'as-needed'],
'sort-imports': [warn, { ignoreDeclarationSort: true }], 'sort-imports': [warn, { ignoreDeclarationSort: true }],
'spaced-comment': [error, 'always', { markers: ['/', '#', '@'] }], 'spaced-comment': [
error,
'always',
{
markers: ['/', '#', '@'],
// allow /*@__PURE__*/
block: { exceptions: ['@'] },
},
],
complexity: [warn, { max: 100 }], complexity: [warn, { max: 100 }],
curly: [error, 'multi-line', 'consistent'], curly: [error, 'multi-line', 'consistent'],
eqeqeq: [error, 'smart'], eqeqeq: [error, 'smart'],