-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add eslint-plugin-perfectionist
and eslint-plugin-react-perf
to the base and /react
configs, respectively
#20
Changes from all commits
ab85639
7a548a1
e898ed1
073dd7e
8fcaad0
3ff4182
3c4b7d1
f275fd9
240ca70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,31 @@ | |
"globals": { | ||
"Bun": "readonly" | ||
}, | ||
"settings": { | ||
"import/core-modules": ["bun", "bun:jsc", "bun:sql", "bun:sqlite", "bun:test"] | ||
}, | ||
"rules": { | ||
"n/no-unsupported-features/es-builtins": "off", | ||
"n/no-unsupported-features/es-syntax": "off", | ||
"n/no-unsupported-features/node-builtins": "off" | ||
"n/no-unsupported-features/node-builtins": "off", | ||
"perfectionist/sort-imports": [ | ||
"error", | ||
{ | ||
"environment": "bun", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"groups": [ | ||
["side-effect", "side-effect-style"], | ||
["builtin", "external"], | ||
["index", "internal", "parent", "sibling", "unknown"], | ||
"object", | ||
[ | ||
"builtin-type", | ||
"external-type", | ||
"index-type", | ||
"internal-type", | ||
"parent-type", | ||
"sibling-type", | ||
"type" | ||
], | ||
"style" | ||
] | ||
} | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
{ | ||
"plugins": ["eslint-plugin-jsx-a11y"], | ||
"plugins": ["eslint-plugin-jsx-a11y", "eslint-plugin-react-perf"], | ||
"extends": [ | ||
"eslint-config-airbnb", | ||
"airbnb/hooks", | ||
"plugin:jsx-a11y/recommended", | ||
"plugin:react-perf/recommended", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice performance recommendations here for React apps |
||
"./eslintBaseConfig.json" | ||
], | ||
"env": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,26 +192,26 @@ export { | |
anError, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. text fixes from here down |
||
buffer, | ||
checkRegexRuleNoMissingGFlag, | ||
checkUnicornRulePreferObjectFromEntries, | ||
checkUnicornRuleRequireArrayJoinSeparator, | ||
checkUnicornRulePreferStringStartsEndsWith, | ||
checkUnicornRulePreferTypeError, | ||
checkRegexRuleNoUselessDollarReplacements, | ||
checkUnicornRulePreferOptionalCatchBinding, | ||
checkUnicornRulePreferSetHas, | ||
checkUnicornRulePreferSpread, | ||
checkUnicornRuleExplicitLengthCheck, | ||
checkUnicornRulePreferTernary, | ||
checkUnicornRulePreferStringTrimStartEnd, | ||
checkUnicornRulePreferRegexpTest, | ||
checkUnicornRulePreferSwitch, | ||
checkUnicornRulePreferArrayFind, | ||
checkUnicornRulePreferArrayFlat, | ||
checkUnicornRulePreferReflectApply, | ||
checkUnicornRulePreferArrayFlatMap, | ||
checkUnicornRulePreferAt, | ||
checkUnicornRulePreferBlobReadingMethods, | ||
checkUnicornRulePreferIncludes, | ||
checkUnicornRulePreferObjectFromEntries, | ||
checkUnicornRulePreferOptionalCatchBinding, | ||
checkUnicornRulePreferReflectApply, | ||
checkUnicornRulePreferRegexpTest, | ||
checkUnicornRulePreferSetHas, | ||
checkUnicornRulePreferSpread, | ||
checkUnicornRulePreferStringStartsEndsWith, | ||
checkUnicornRulePreferStringTrimStartEnd, | ||
checkUnicornRulePreferSwitch, | ||
checkUnicornRulePreferTernary, | ||
checkUnicornRulePreferTypeError, | ||
checkUnicornRuleRequireArrayJoinSeparator, | ||
escapeSequence, | ||
eventTarget, | ||
fortyTwo, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a huge upside to these are they are now auto-fixable with
eslint-plugin-perfectionist
, so you can fix your whole codebase with one command (e.g.eslint --fix
)