2.1.0 • Published 5 years ago
@telus/api-platform-standard v2.1.0
API Platform Standard
@telus/api-platform-standard is inspired by @telus/telus-standard but with semicolons and comma dangles to bring order to the chaos.
Why
- The reason for using semicolons
- The reason for using comma dangles
- Our API team (Atomic Unicorn) has dozens of APIs using semicolons and comma-dangles and we are used to it.
Install
npm install api-platform-standard --save-devUsage
You can manually run telus-standard from your project repo:
./node_modules/.bin/telus-standardYou can also add telus-semistandard to your package.json scripts:
{
"scripts": {
"lint": "telus-standard --verbose",
"lint:fix": "telus-standard --verbose --fix",
}
}Migrating from @telus/eslint-config
Remove unnecessary packages
npm rm @telus/eslint-config \ eslint-config-airbnb \ eslint-config-prettier \ eslint-plugin-import \ eslint-plugin-jest \ eslint-plugin-jsx-a11y \ eslint-plugin-reactInstall
telus-standardnpm i --save-dev api-platform-standardUpdate or add the these scripts in your package.json
{ "scripts": { "lint": "telus-standard --verbose", "lint:fix": "telus-standard --verbose --fix", } }Run the lint command
npm run lint
Removing eslint-loader
telus-semistandard does not work with eslint-loader. If you are unaware,
eslint-loader runs in your webpack pipeline so that eslint rules are forced to
run prior to the application working.
eslint-loader has been removed from
telus-isomorphic-starter-kit,
you can
read more about the decision from the Pull Request.
- Remove the package:
npm rm eslint-loader - Remove references to the package in your project:
rules: [ - { - test: /\.(js|jsx)$/, - enforce: 'pre', - use: ['eslint-loader'], - include: path.join(__dirname, 'src') - }, {
Github: @telus • Twitter: @telusdigital
2.1.0
5 years ago