-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
ESLint TypeScript Configuration Package #19
Labels
Milestone
Comments
arcticicestudio
added a commit
that referenced
this issue
Aug 20, 2019
To support projects build with TypeScript (1), a new `@arcticicestudio/eslint-config-typescript` package has been implemented using the awesome @typescript-eslint (2) project. It will mainly extend `@typescript-eslint/eslint-plugin`'s already provided and recommended configurations (3) in order to adapt best practices: 1. `plugin:@typescript-eslint/eslint-recommended` 2. `plugin:@typescript-eslint/recommended` 3. `plugin:@typescript-eslint/recommended-requiring-type-checking` The `@typescript-eslint/parser` (4) is set as ESLint parser. Also as of `@typescript-eslint/parser` version `2.0.0` (5) (also see typescript-eslint/typescript-eslint#890 (6)), the parser will panic when parsing files that are not included within the provided tsconfig(s). The package documentation contains instructions and a quick setup and usage guide to inform about the required `tsconfig` configurations (7) and the corresponding `eslintrc` changes. Next to the support for TypeScript, the package also modifies some React and import related rules in order to prevent conflicts, like the adaption of the `.ts` and `.tsx` extensions for all JS and JSX files as well as removing `.jsx` to force the usage of `.tsx`. There are other rules that have been disabled like the check for valid React `prop-types` since these and not necessary anymore when working with TypeScript. The new package provides two entry points, available as `@arcticicestudio/eslint-config-typescript` (main) and `@arcticicestudio/eslint-config-typescript/prettier` that can both be composed with all other available entry points (8) to inherit their rules. This package mainly depends on the `@typescript-eslint/eslint-plugin@^2.0.0` and `@typescript-eslint/parser@^2.0.0` packages as peer dependencies. References: (1) https://www.typescriptlang.org (2) https://github.com/typescript-eslint/typescript-eslint (3) https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/src/configs (4) https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser (5) https://github.com/typescript-eslint/typescript-eslint/releases/tag/v2.0.0 (6) typescript-eslint/typescript-eslint#890 (7) https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration (8) https://github.com/arcticicestudio/styleguide-javascript/blob/develop/packages/%40arcticicestudio/eslint-config/README.md#entry-points GH-19
arcticicestudio
added a commit
that referenced
this issue
Aug 20, 2019
To support projects build with TypeScript (1), a new `@arcticicestudio/eslint-config-typescript` package has been implemented using the awesome @typescript-eslint (2) project. It will mainly extend `@typescript-eslint/eslint-plugin`'s already provided and recommended configurations (3) in order to adapt best practices: 1. `plugin:@typescript-eslint/eslint-recommended` 2. `plugin:@typescript-eslint/recommended` 3. `plugin:@typescript-eslint/recommended-requiring-type-checking` The `@typescript-eslint/parser` (4) is set as ESLint parser. Also as of `@typescript-eslint/parser` version `2.0.0` (5) (also see typescript-eslint/typescript-eslint#890 (6)), the parser will panic when parsing files that are not included within the provided tsconfig(s). The package documentation contains instructions and a quick setup and usage guide to inform about the required `tsconfig` configurations (7) and the corresponding `eslintrc` changes. Next to the support for TypeScript, the package also modifies some React and import related rules in order to prevent conflicts, like the adaption of the `.ts` and `.tsx` extensions for all JS and JSX files as well as removing `.jsx` to force the usage of `.tsx`. There are other rules that have been disabled like the check for valid React `prop-types` since these and not necessary anymore when working with TypeScript. The new package provides two entry points, available as `@arcticicestudio/eslint-config-typescript` (main) and `@arcticicestudio/eslint-config-typescript/prettier` that can both be composed with all other available entry points (8) to inherit their rules. This package mainly depends on the `@typescript-eslint/eslint-plugin@^2.0.0` and `@typescript-eslint/parser@^2.0.0` packages as peer dependencies. References: (1) https://www.typescriptlang.org (2) https://github.com/typescript-eslint/typescript-eslint (3) https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/src/configs (4) https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser (5) https://github.com/typescript-eslint/typescript-eslint/releases/tag/v2.0.0 (6) typescript-eslint/typescript-eslint#890 (7) https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration (8) https://github.com/arcticicestudio/styleguide-javascript/blob/develop/packages/%40arcticicestudio/eslint-config/README.md#entry-points Resolves GH-19
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To support projects build with TypeScript, a new
@arcticicestudio/eslint-config-typescript
package will be implemented using the awesome @typescript-eslint project. It will mainly extend@typescript-eslint/eslint-plugin
's already provided and recommended configurations in order to adapt best practices:plugin:@typescript-eslint/eslint-recommended
plugin:@typescript-eslint/recommended
plugin:@typescript-eslint/recommended-requiring-type-checking
The
@typescript-eslint/parser
will be set as ESLint parser. As of@typescript-eslint/parser
version2.0.0
(also see typescript-eslint/typescript-eslint#890), the parser will panic when parsing files that are not included within the provided tsconfig(s).The documentation of the new package will contain instructions and a quick setup and usage guide to inform about the required
tsconfig
configurations and the correspondingeslintrc
changes.Next to the support for TypeScript, the package will also modify some React and import related rules in order to prevent conflicts, like the adaption of the
.ts
and.tsx
extensions for all JS and JSX files as well as removing.jsx
to force the usage of.tsx
. There are other rules that'll be disabled like the check for valid Reactprop-types
since these and not necessary anymore when working with TypeScript.The new package will provide two entry points, available as
@arcticicestudio/eslint-config-typescript
(main) and@arcticicestudio/eslint-config-typescript/prettier
that can both be composed with all other available entry points to inherit their rules.This package will mainly depend on the
@typescript-eslint/eslint-plugin@^2.0.0
and@typescript-eslint/parser@^2.0.0
packages as peer dependencies.The text was updated successfully, but these errors were encountered: