Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tricinel/eslint-config-frontwerk-typescript
ESLint config rules for Frontwerk and TypeScript
https://github.com/tricinel/eslint-config-frontwerk-typescript
es6 eslint eslint-config frontend javascript linting style-guide tslint tslint-config typescript
Last synced: about 20 hours ago
JSON representation
ESLint config rules for Frontwerk and TypeScript
- Host: GitHub
- URL: https://github.com/tricinel/eslint-config-frontwerk-typescript
- Owner: tricinel
- License: mit
- Created: 2019-10-07T15:16:19.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:12:02.000Z (almost 2 years ago)
- Last Synced: 2024-10-02T09:09:19.385Z (about 1 month ago)
- Topics: es6, eslint, eslint-config, frontend, javascript, linting, style-guide, tslint, tslint-config, typescript
- Language: JavaScript
- Homepage:
- Size: 1000 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: Readme.md
- Changelog: Changelog.md
- Contributing: Contributing.md
- License: License.md
Awesome Lists containing this project
README
# eslint-config-frontwerk-typescript
![Node Version][node-version-badge] ![Npm version][npm-version-badge]
[![Npm downloads][npm-downloads-badge]][npm-downloads-badge] ![License][license-badge]This package provides [Frontwerk][frontwerkorg]'s TypeScript .eslintrc as an extensible shared [ESLint][eslint] config.
## Usage
1. Install the versions of the package, including its `peerDependencies`:
```sh
npm install --dev eslint-config-frontwerk-typescript @typescript-eslint/{eslint-plugin,parser} eslint eslint-plugin-import typescript
```Or with **yarn**:
```sh
yarn add --dev eslint-config-frontwerk-typescript @typescript-eslint/{eslint-plugin,parser} eslint eslint-plugin-import typescript
```2. Extend your desired config file in your `.eslintrc`. We expose two configurations:
> Semantic rules use the TypeScript compiler to inspect static types and validate code patterns. These rules require that a valid tsconfig.json file be present and referenced in your `parserOptions`'s `project` inside of your `.eslintrc`. When using the recommended (default) config, be sure to pass a `tsconfig.json` in your `.eslintrc`.
- The recommended (default) config that includes the TypeScript rules that require type checking. Add `"extends": "frontwerk-typescript"` to your `.eslintrc`.
> ```
> {
> "extends": ["frontwerk-typescript", "plugin:import/typescript"],
> "parserOptions": {
> "project": "./tsconfig.json"
> },
> }
> ```- A config **without** the TypeScript rules that require type checking. Add `"extends": "frontwerk-typescript/no-type-checking"` to your `.eslintrc`.
- A config **with** the TypeScript rules that are stricter. Add `"extends": "frontwerk-typescript/strict"` to your `.eslintrc`.## Related
- `eslint-config-frontwerk-typescript` is based on the ESLint rules defined in [eslint-config-frontwerk][eslint-config-frontwerk].
- If you're using [ReactJS][reactjs], check out [eslint-config-frontwerk-react][eslint-config-frontwerk-react].## Contributing
- Run tests with `npm run test` or `yarn test`.
- Run the lint with `npm run lint` or `yarn lint`.For details, check out the [Contributing][contributing] guide.
# LICENSE
MIT
[eslint]: https://eslint.org/
[typescript]: https://www.typescriptlang.org/
[frontwerkorg]: https://frontwerk.org
[license]: https://github.com/tricinel/eslint-config-frontwerk-typescript/blob/master/LICENSE
[node-version-badge]: https://img.shields.io/node/v/eslint-config-frontwerk-typescript.svg?style=flat-square
[license-badge]: https://img.shields.io/npm/l/eslint-config-frontwerk-typescript.svg?style=flat-square
[npm-version-badge]: https://img.shields.io/npm/v/eslint-config-frontwerk-typescript.svg?style=flat-square
[npm-downloads-badge]: https://img.shields.io/npm/dt/eslint-config-frontwerk-typescript.svg?style=flat-square
[contributing]: ./Contributing.md
[eslint-config-frontwerk]: https://github.com/tricinel/eslint-config-frontwerk
[reactjs]: https://reactjs.org/
[eslint-config-frontwerk-react]: https://github.com/tricinel/eslint-config-frontwerk-react