Skip to content

Instantly share code, notes, and snippets.

@toruticas
Last active December 28, 2020 14:53
Show Gist options
  • Save toruticas/912c53b17c701e1776820696f5b390ee to your computer and use it in GitHub Desktop.
Save toruticas/912c53b17c701e1776820696f5b390ee to your computer and use it in GitHub Desktop.
Configuration: Prettier + Eslint + TS
module.exports = {
plugins: ['prettier', 'react', '@typescript-eslint'],
extends: [
'./node_modules/kcd-scripts/eslint.js',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
],
rules: {
'prettier/prettier': 'error',
'react/jsx-filename-extension': [
1,
{ extensions: ['.js', '.jsx', '.tsx'] },
],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
paths: ['src'],
},
},
},
}
const prettierConfig = require('kcd-scripts/prettier');
module.exports = Object.assign(prettierConfig, {
bracketSpacing: true,
endOfLine: 'lf',
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment