Transloadit eslint rules
eslint-config-airbnb, with a dash of standard and a pinch of transloadit 🤏
- Install the correct versions of each package, which are listed by the command:
npm info "eslint-config-transloadit@latest" peerDependenciesIf using npm 5+, use this shortcut
npx install-peerdeps --dev eslint-config-transloaditIf using yarn, you can also use the shortcut described above if you have npm 5+ installed on your machine, as the command will detect that you are using yarn and will act accordingly.
-
npm install --save-dev eslint-config-transloadit -
Add
"extends": "transloadit"to your.eslintrc
See also eslint-config-airbnb
When upgrading to v2, these can be overridden and set to warn in consuming projects at first:
- Rule of Hooks https://reactjs.org/docs/hooks-rules.html
no-unreachable-loopmax-classes-per-fileis set to 1 (from airbnb)one-var(from airbnb)no-underscore-dangle(from airbnb)comma-danglenow also enforces:"functions: 'always-multiline'"(from airbnb)operator-linebreakis nownone(from airbnb), meaning there can be no linebreak before or after=
off/warn-overrides for these inside consuming projects can be deleted:
react/jsx-one-expression-per-lineno-await-in-loop
@babel/eslint-parseris no longer the default. If you are using syntax that's not supported by the default parser of the ESLint version you are using, you need to addparser: '@babel/eslint-parser'to your.eslintrc.jsand adjust theparserOptionsproperty. You probably also want to add@babel/eslint-pluginto the list of plugins.- Remove peer dependencies
@babel/core,@babel/eslint-parserand@babel/eslint-plugin - Add
peerDependencyeslint-plugin-transloaditand added ruletransloadit/no-useless-iife - Upgrade
peerDependencyeslint-plugin-promisefrom 4 to 6 - Remove
eslint-plugin-jest - Upgrade
eslint-config-airbnbfrom 18 to 19 - Add rule
no-implicit-coercion
npm i -g npnp