Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 2.78 KB

README.md

File metadata and controls

71 lines (53 loc) · 2.78 KB

eslint-config-email npm downloads

The eslint config for Coremail (c)

This module exports a flat ESLint configuration which is supported since eslint 8.21.0, basing eslint-config-standard.

Notes that eslint-config-standard is likely deprecated and stop maintaining. It's encouraged to switch to neo-standard for standard users.

This project is only focus on eslint config, and not providing framework tooling like neo-standard.

Quick start

  1. npm install --save-dev eslint eslint-config-coremail

  2. For projects using esm, add eslint.config.js as:

    import {configs} from 'eslint-config-coremail';
    
    export default [
        // default enables browser & node env, you can change to `configs.node` for server side project
        configs.standard, {
            // your overrides here
        }, {
            // for legacy codes compliant with old IE
            ...configs.legacy,
            files : ['path/to/legacy/codes/**'],
        },
    ]
  3. For projects using commonjs, add eslint.config.js as:

    module.exports = import('eslint-config-coremail').then(({configs}) => [
        // default enables browser & node env, you can change to `configs.node` for server side project
        configs.standard, {
            // your overrides here
        }, {
            // for legacy codes compliant with old IE
            ...configs.legacy,
            files : ['path/to/legacy/codes/**'],
        },
    ]);

Migrating from eslint-config-coremail 0.x / eslint-config-standard 17.x

  1. Read this article for ESLint 9 migration
  2. Migrate deprecated ESLint style rules with eslint-stylistic rules following this guide

Learn more

For more information on the full listing of rules that eslint supports, and more, visit

License

MIT. Copyright (c) Coremail.