@devesharp/eslint-config-typescript
v2.0.1
Published
> ESLint config with TypeScript
Downloads
16
Readme
eslint-config-devesharp
ESLint config with TypeScript
Usage
Install dependencies.
yarn add @typescript-eslint/eslint-plugin@^2.7.0 \
eslint-config-airbnb-typescript@^6.3.1 \
eslint-config-prettier@^6.4.0 \
eslint-plugin-import@^2.18.2 \
eslint-plugin-jest@^22.17.0 \
eslint-plugin-jsx-a11y@^6.2.3 \
eslint-plugin-prettier@^3.1.1 \
eslint-plugin-react@^7.15.1 \
eslint-plugin-react-hooks@^1.7 \
[email protected] \
@devesharp/eslint-config-typescript \
eslint \
prettier \
typescript \
-D
Create a .eslintrc.js
with:
module.exports = {
extends: ['@devesharp/typescript'],
};
Within your Prettier config file .prettierrc.js
:
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
useTabs: false,
printWidth: 120,
tabWidth: 4,
};
Within your .editorconfig
:
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
[*.yml]
indent_style = space
indent_size = 4
Without React
Install dependencies.
yarn add @typescript-eslint/eslint-plugin@^2.7.0 \
eslint-config-airbnb-typescript@^6.3.1 \
eslint-config-prettier@^6.4.0 \
eslint-plugin-import@^2.18.2 \
eslint-plugin-jest@^22.17.0 \
eslint-plugin-jsx-a11y@^6.2.3 \
eslint-plugin-prettier@^3.1.1 \
@devesharp/eslint-config-typescript \
eslint \
prettier \
typescript \
-D
Create a .eslintrc.js
with:
module.exports = {
extends: ['@devesharp/typescript/base'],
};