Skip to content
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

eslint config: Fix modern module resolution #9562

Merged
merged 6 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions common/build/eslint-config-fluid/eslint7.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = {
"extends": [
"eslint:recommended",
"plugin:eslint-comments/recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
Expand All @@ -34,8 +33,6 @@ module.exports = {
"project": "./tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"react",
"unicorn",
],
"reportUnusedDisableDirectives": true,
Expand Down
31 changes: 28 additions & 3 deletions common/build/eslint-config-fluid/minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ module.exports = {
},
"extends": [
"./eslint7",
"@rushstack/eslint-config/profile/web-app",
"plugin:eslint-comments/recommended",
// "plugin:react/recommended",
// "@rushstack/eslint-config/profile/web-app",
"plugin:eslint-comments/recommended",
"plugin:import/errors",
"plugin:import/warnings",
Expand All @@ -31,11 +33,24 @@ module.exports = {
"project": "./tsconfig.json",
},
"plugins": [
// Plugin documentation: https://www.npmjs.com/package/@rushstack/eslint-plugin
"@rushstack/eslint-plugin",
// Plugin documentation: https://www.npmjs.com/package/@rushstack/eslint-plugin-security
"@rushstack/eslint-plugin-security",
// Plugin documentation: https://www.npmjs.com/package/@typescript-eslint/eslint-plugin
"@typescript-eslint/eslint-plugin",
// Plugin documentation: https://www.npmjs.com/package/eslint-plugin-promise
"eslint-plugin-promise",
"react",
"unicorn",
],
"reportUnusedDisableDirectives": true,
"rules": {

// The @rushstack rules are documented in the package README:
// https://www.npmjs.com/package/@rushstack/eslint-plugin
"@rushstack/no-new-null": "warn",

// RATIONALE: Harmless. Our guideline is to only use leading underscores on private members
// when required to avoid a conflict between private fields and a public property.
// Docs: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md
Expand All @@ -57,6 +72,8 @@ module.exports = {
],

// ENABLED INTENTIONALLY
// Disabled because we don't require that all variable declarations be explicitly typed.
"@rushstack/typedef-var": "off",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/no-non-null-assertion": "error",
Expand All @@ -73,7 +90,16 @@ module.exports = {
"code": 120
}
],
"no-multi-spaces": ["error", {"ignoreEOLComments": true}],
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true
}
],

// Catches a common coding mistake where "resolve" and "reject" are confused.
"promise/param-names": "warn",

"unicorn/better-regex": "error",
"unicorn/filename-case": [
"error",
Expand All @@ -88,7 +114,6 @@ module.exports = {
"unicorn/no-unsafe-regex": "error",

// DISABLED INTENTIONALLY
"@rushstack/typedef-var": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/indent": "off", // Off because it conflicts with typescript-formatter
Expand Down