@mkaradeniz/eslint-config
Personal ESLint Configuration.
Installation
yarn add -D @mkaradeniz/eslint-config
npx install-peerdeps --dev @mkaradeniz/eslint-config
Add following script to the package.json
:
"lint": "eslint --ext .js \"./src/\" --fix",
Create a .eslintrc.js
with the following content:
module.exports = {
extends: [require.resolve('@mkaradeniz/eslint-config')],
}
GraphQL
To use the graphql plugin:
yarn add -D eslint-plugin-graphql
yarn add -D graphql
Add the plugin to the .eslintrc.js
plugins:
plugins: ['graphql']
Add the following to the .eslintrc.js
rules:
rules: {
'graphql/template-strings': [
'error',
{
env: 'apollo',
schemaJsonFilepath: path.resolve(__dirname, './schema.json'),
tagName: 'gql',
},
],
},