@teachers/eslint-config-tpt-typescript v4.3.1
eslint-config-tpt-typescript
Recommended TpT eslint config with typescript. Owned and maintained by Web Platform.
This package currently includes rules that are applicable both for React-based projects and Node backends.
Usage
1) Add to your project's dependencies:
yarn add --dev @teachers/eslint-config-tpt-typescript
2) Reference in your .eslintrc.js file:
Your project should have a .eslintrc.js file to configure ESLint. (If you're using a .json config file, please convert it to .js), that looks like:
// Patch ESLint to allow managing plugins via shared configuration files
require('@teachers/eslint-config-tpt-typescript/eslint-patch');
module.exports = {
// Extend from TPT shared config
extends: '@teachers/tpt-typescript',
// Don't combine with ESLint configs in parent folders
root: true,
// Setup for Typescript
settings: {
'import/resolver': {
typescript: {},
},
}
}
3) Configure Prettier
To get Prettier to work with this config, use the following .pretterrc.json
:
{
"singleQuote": true,
"arrowParens": "always"
}
Release and versioning
This package follows semantic versioning enforced by the semantic-pr app and uses standard-version to generate changelogs. Note that most rule changes are going to require BREAKING CHANGE (i.e. they might cause existing apps to no longer pass linting). To make a change
- Open a pr with a semantic title/body and get it approved and merged. Do not modify the version in package.json or the changelog.
- In master run
yarn release
. Note you need permission to push to master to get it to run. Contact web-platform if you don't have permissions. This script will generate a Changelog, bump the version, commit the change, and runyarn publish
.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago