-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Upgrade linting to 2.0.0-0 #3280
Changes from 9 commits
ff0a49d
467c3c8
2251103
e98e220
b5fe066
4dc9720
9b85e6f
de40a24
8f56822
6ea6fa7
226e983
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 |
---|---|---|
|
@@ -43,7 +43,6 @@ module.exports = { | |
rules: { | ||
// transloadit rules we are actually ok with in the uppy repo | ||
'import/extensions': 'off', | ||
'no-await-in-loop': 'off', | ||
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. we no longer enforce this in 2.0.0-0 as requested by Antoine |
||
'object-shorthand': ['error', 'always'], | ||
'strict': 'off', | ||
'key-spacing': 'off', | ||
|
@@ -79,6 +78,7 @@ module.exports = { | |
'global-require': ['warn'], | ||
'import/no-unresolved': ['warn'], | ||
'import/order': ['warn'], | ||
'max-classes-per-file': ['warn'], | ||
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. This is new, setting it to warn for now, hopefully we can fix this in later, smaller, custom rolled PRs, and save this one for automation and getting the upgrade out the door. |
||
'no-mixed-operators': ['warn'], | ||
'no-param-reassign': ['warn'], | ||
'no-redeclare': ['warn'], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,17 +68,18 @@ | |
"deep-freeze": "^0.0.1", | ||
"disc": "^1.3.3", | ||
"eslint": "^8.0.0", | ||
"eslint-config-transloadit": "^1.2.0", | ||
"eslint-config-transloadit": "2.0.0-0", | ||
"eslint-plugin-compat": "^3.8.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-import": "^2.25.2", | ||
"eslint-plugin-jest": "^25.0.0", | ||
"eslint-plugin-jsdoc": "^36.0.0", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-markdown": "^2.2.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prefer-import": "^0.0.1", | ||
"eslint-plugin-promise": "^5.1.0", | ||
"eslint-plugin-promise": "^4.3.1", | ||
"eslint-plugin-react": "^7.22.0", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
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. Is this one still necessary even though we added the react docs to the ignore-list? 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. What do you mean by "added the react docs to the ignore-list"? 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. I'm referring to #3280 (comment). 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. I think eslint plugin react hooks is needed for the rule of hooks rules to work. |
||
"events.once": "^2.0.2", | ||
"exorcist": "^2.0.0", | ||
"fakefile": "^1.0.0", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,7 +236,7 @@ const validateConfig = (companionOptions) => { | |
fs.accessSync(`${companionOptions.filePath}`, fs.R_OK | fs.W_OK) // eslint-disable-line no-bitwise | ||
} catch (err) { | ||
throw new Error( | ||
`No access to "${companionOptions.filePath}". Please ensure the directory exists and with read/write permissions.` | ||
`No access to "${companionOptions.filePath}". Please ensure the directory exists and with read/write permissions.`, | ||
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. Not sure about more commas, is this for the same reason, to add new args easier? 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. Yes, less diff noise if args are added or removed from functions. Same as for object literals, but in v1 function argument comma enforcement was disabled |
||
) | ||
} | ||
|
||
|
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.
Sadly, without this, eslint crashes on: