Skip to content

Commit

Permalink
fix: adjust max-lines
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed May 31, 2024
1 parent 1ffa6d1 commit fec2da3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/flat-configs/custom/custom-rules/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export const eslintRules: FlatConfigRules = {
eqeqeq: ['error', 'always', { null: 'ignore' }],
'func-style': ['error', 'declaration'],
'max-depth': ['error', 4],
'max-lines': ['error', { max: 1000, skipBlankLines: true, skipComments: true }],
'max-lines-per-function': ['error', { max: 500, skipBlankLines: true, skipComments: true }],
'max-lines': ['error', { max: 500, skipBlankLines: true, skipComments: true }],
'max-lines-per-function': ['error', { max: 80, skipBlankLines: true, skipComments: true }],
'max-params': 'error',
'new-cap': ['error', { capIsNew: false, newIsCap: true, properties: true }],
'no-array-constructor': 'error',
'no-caller': 'error',
'no-console': [isProduction ? 'error' : 'warn', { allow: ['info', 'table', 'assert', 'warn', 'error', 'trace'] }],
'no-console': [isProduction ? 'warn' : 'error', { allow: ['info', 'table', 'assert', 'warn', 'error', 'trace'] }],
'no-constant-condition': ['error', { checkLoops: false }],
'no-debugger': isProduction ? 'error' : 'warn',
'no-dupe-class-members': 'off',
Expand Down
3 changes: 3 additions & 0 deletions src/flat-configs/custom/react.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { jsxOrTsxGlob } from '../../lib/constants.js'
import { getContext, isPackageInstalled } from '../../lib/utils.js'
import type { FlatConfigs } from '../../types/eslint.js'

Expand Down Expand Up @@ -26,8 +27,10 @@ export function getReactConfigs() {

if (options.react) {
reactConfigs.push({
files: [jsxOrTsxGlob],
name: 'react',
rules: {
'max-lines-per-function': ['error', { max: 500, skipBlankLines: true, skipComments: true }],
'react-refresh/only-export-components': [
'error',
{ allowConstantExport: true, allowExportNames: getAllowExportNames() },
Expand Down
2 changes: 1 addition & 1 deletion src/flat-configs/recommended/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { FlatConfigs } from '../../types/eslint.js'
export const baseConfigs: FlatConfigs = [
{
files: [jsOrTsGlob],
ignores: getGitIgnores(),
ignores: ['node_modules/**/*', 'dist/**/*', ...getGitIgnores()],
languageOptions: {
globals: {
...globals.browser,
Expand Down

0 comments on commit fec2da3

Please sign in to comment.