eslint-config-tjw-import

1.0.0 • Public • Published

eslint-config-tjw-import

The Jared Wilcurt's strict ESLint rules for importing files.

Using this

  1. npm install --save-dev eslint-plugin-import eslint-config-tjw-import
  2. In your .eslitrc.js add tjw-import to your extends like so:
    module.exports = {
      extends: [
        'tjw-import'
      ]
    };

You may optionally want to add in an import resolver if you use webpack for aliasing.

// .eslintrc.js
const path = require('path');

module.exports = {
  extends: [
    'tjw-import'
  ],
  settings: {
    'import/resolver': {
      webpack: {
        config: {
          resolve: {
            alias: {
              '@': path.resolve('src'),
              '@@': path.resolve('tests')
            }
          }
        }
      }
    }
  }
};

See also:

Readme

Keywords

Package Sidebar

Install

npm i eslint-config-tjw-import

Weekly Downloads

10

Version

1.0.0

License

MIT

Unpacked Size

7.01 kB

Total Files

4

Last publish

Collaborators

  • thejaredwilcurt