@cesarcf/eslint-config

esLint && prettier Configuration

Usage no npm install needed!

<script type="module">
  import cesarcfEslintConfig from 'https://cdn.skypack.dev/@cesarcf/eslint-config';
</script>

README

eslint-config

ESLint shareable config for JavaScript projects

What is eslint-config?

Shared configuration for ESLint. Follow the instructions below to easily include this configuration in another project without having to duplicate the file.

How do I install it?

npm install --save-dev @cesarcf/eslint-config

Usage

Add the following to your .eslintrc.js file:

module.exports = {
  extends: '@cesarcf'
}

Add the following to your prettier.config.js file:

module.exports = require('@cesarcf/eslint-config/prettier.config')

If you need to override a rule, your .eslintrc.js file should look like the example below.

module.exports = {
  extends: '@cesarcf',
  root: true,
  settings: {
    react: {
      version: 'detect'
    },
    'import/resolver': {
      alias: {
        map: [
          ['components', './src/components/'],
          ['assets', './src/assets/'],
          ['utils', './src/utils/'],
          ['test', './src/test/']
        ],
        extensions: ['.js', '.jsx']
      }
    }
  }
}

License

Copyright (c) 2020 Cesar Carbajo. Licensed under the MIT license.