3.0.0 • Published 4 years ago

@mkaradeniz/eslint-config-react v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@mkaradeniz/eslint-config-react

Personal ESLint React Configuration.

Installation

yarn add -D @mkaradeniz/eslint-config-react
npx install-peerdeps --dev @mkaradeniz/eslint-config-react

Add following script to the package.json:

"lint": "eslint --ext .js --ext .jsx \"./src/\" --fix",

Create a .eslintrc.js with the following content:

module.exports = {
  extends: [require.resolve('@mkaradeniz/eslint-config-react')],
}

GraphQL

To use the graphql plugin:

yarn add -D eslint-plugin-graphql
yarn add -D graphql # if not installed yet

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'), // Don't forget: `const path = require('path');`
				tagName: 'gql',
			},
		],
  },
3.0.0

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.2.2

5 years ago

1.1.0

5 years ago

1.0.4

6 years ago

1.0.2

6 years ago