0.15.11 • Published 11 months ago

@arianrhodsandlot/eslint-config v0.15.11

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

ESLint Config

npm

A set of predefined ESLint config.

Usage

To use this package, ESLint should be configured by an file named eslint.config.js, since we are using ESLint's flat config.

  • Basic usage:
    export { default } from '@arianrhodsandlot/eslint-config'
  • For CommonJS environment:
    module.exports = require('@arianrhodsandlot/eslint-config').config
  • Advanced usage:

    • Use the more powerful function createConfig + createConfig is a smart function that can detect should TS rules be enabled or which libraries-related plugins/rules should be + added:

        ```js
        import { createConfig } from '@arianrhodsandlot/eslint-config'
      
        export default createConfig()
        ```
      
      + Since flat config is actually an array, we can append more config items to it:
        ```js
        import { createConfig } from '@arianrhodsandlot/eslint-config'
      
        export default createConfig({
          append: {
            files: ['**/*.html'],
            plugins: {
              html: eslintHtmlPlugin,
            },
            rules: eslintHtmlPlugin.configs.recommended.rules,
          },
          prepend: {
            ignore: ['build/**/*']
          },
        })
        ```
      
      + Additional plugins/rules can be explictly enabled or disabled:
        ```js
        import { createConfig } from '@arianrhodsandlot/eslint-config'
      
        export default createConfig({
          markdown: false,
          next: true,
          prettier: false,
          react: true,
          rules: {
            eqeqeq: 'off',
          },
        })
        ```
      
        The full list of options are listed below.
        ```ts
        export interface CreateConfigOptions {
          /** Append custom flat configs to default */
          append?: FlatConfig | FlatConfigs
      
          /** Should eslint-plugin-compat be enabled */
          compat?: boolean
      
          /** Should eslint-plugin-diff be enabled */
          diff?: boolean
      
          /** Should eslint-plugin-eslint-comments be enabled */
          eslintComments?: boolean
      
          /** Should eslint-plugin-import be enabled */
          import?: boolean
      
          /** Should eslint-plugin-jsdoc be enabled */
          jsdoc?: boolean
      
          /** Should eslint-plugin-markdown be enabled */
          markdown?: boolean
      
          /** Should eslint-plugin-n be enabled */
          n?: boolean
      
          /** Should \@next/eslint-plugin-next be enabled */
          next?: boolean
      
          /** Should eslint-plugin-perfectionist be enabled */
          perfectionist?: boolean
      
          /** Append custom flat configs to default */
          prepend?: FlatConfig | FlatConfigs
      
          /** Should eslint-plugin-prettier be enabled */
          prettier?: boolean
      
          /** Should eslint-plugin-promise be enabled */
          promise?: boolean
      
          /** Should eslint-plugin-react, eslint-plugin-jsx-a11y, eslint-plugin-react-hooks, eslint-plugin-react-refresh be enabled */
          react?: boolean
      
          /** Should eslint-plugin-regexp be enabled */
          regexp?: boolean
      
          /** Custom rules */
          rules?: FlatConfigRules
      
          /** Should eslint-plugin-security be enabled */
          security?: boolean
      
          /** Should eslint-plugin-sonarjs be enabled */
          sonarjs?: boolean
      
          /** Should eslint-plugin-tsdoc be enabled */
          tsdoc?: boolean
      
          /** Should \@typescript-eslint/eslint-plugin be enabled */
          typescript?: boolean
      
          /** Should eslint-plugin-unicorn be enabled */
          unicorn?: boolean
      
          /** Should eslint-plugin-vue, eslint-plugin-vuejs-accessibility, eslint-plugin-vue-scoped-css be enabled */
          vue?: boolean
        }
        ```

Features

License

MIT

0.15.4

1 year ago

0.15.5

1 year ago

0.15.6

1 year ago

0.15.7

1 year ago

0.15.8

1 year ago

0.15.9

11 months ago

0.15.2

1 year ago

0.15.3

1 year ago

0.15.10

11 months ago

0.15.11

11 months ago

0.15.1

1 year ago

0.15.0

1 year ago

0.14.0

1 year ago

0.13.0

1 year ago

0.12.0

1 year ago

0.12.1

1 year ago

0.12.2

1 year ago

0.11.3

1 year ago

0.11.2

1 year ago

0.11.0

1 year ago

0.11.1

1 year ago

0.10.1

1 year ago

0.10.2

1 year ago

0.10.0

1 year ago

0.9.0

1 year ago

0.9.1

1 year ago

0.8.5

2 years ago

0.8.4

2 years ago

0.8.0-alpha.1

2 years ago

0.8.0-alpha.0

2 years ago

0.8.1

2 years ago

0.7.2

2 years ago

0.8.0

2 years ago

0.7.1

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.7.3

2 years ago

0.6.0-alpha.1

2 years ago

0.6.0-alpha.2

2 years ago

0.6.0-alpha.0

2 years ago

0.7.0-alpha.1

2 years ago

0.7.0-alpha.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.0-alpha.3

2 years ago

0.5.0-alpha.2

2 years ago

0.5.0-alpha.1

2 years ago

0.5.0-alpha.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.2-alpha.1

2 years ago

0.1.2-alpha.0

2 years ago

0.1.1-alpha.0

2 years ago

0.1.0

2 years ago