1.4.1 • Published 2 years ago
@joaod3v/eslint-config v1.4.1
Joao Silva ESLint config
Whats included?
ReactJS/NextJS
ESLint:
- React/Next plugin;
- React Hooks plugin;
- TypeScript;
- JSX a11y plugin;
- Prettier;
Prettier:
- trailingComma: 'es5';
- semi: true;
- singleQuote: true;
- endOfLine: 'auto';
NodeJS
- TypeScript;
- Prettier;
Prettier:
- trailingComma: 'es5';
- semi: true;
- singleQuote: true;
- endOfLine: 'auto';
React Native
ESLint:
- React plugin;
- React Hooks plugin;
- TypeScript;
- Prettier;
Prettier:
- trailingComma: 'es5';
- semi: true;
- singleQuote: true;
- endOfLine: 'auto';
Setup
- Install the dependencies
npm i -D eslint @joaod3v/eslint-config- Create a
.eslintrc.jsonfile extending the config:
NextJS config also serve to ReactJS!
{
"extends": "@joaod3v/eslint-config/next"
// "extends": "@joaod3v/eslint-config/node"
// "extends": "@joaod3v/eslint-config/react-native"
}You can also use a
.eslintrc.jsinstead of JSON if you prefer.