@berun/fluent-eslint
TypeScript icon, indicating that this package has built-in type declarations

7.3.6 • Public • Published

@berun/fluent-eslint

Use a chaining API to generate and simplify the modification of ESLint configurations.

_Note: This is is part of the broader @berun/fluent suite of configurations, but may be used standalone.

Example

export default function(berun: Berun, options) {
  berun.eslint
    .root(true)
    .parser('babel-eslint')
    .plugins.add('import')
    .add('flowtype')
    .add('jsx-a11y')
    .add('react')
    .end()
    .env({
      browser: true,
      commonjs: true,
      es6: true,
      jest: true,
      node: true
    })
    .parserOptions({
      ecmaVersion: 6,
      sourceType: 'module',
      ecmaFeatures: {
        jsx: true,
        generators: true,
        experimentalObjectRestSpread: true
      }
    })
    .rules.set('array-callback-return', 'warn')
    .set('default-case', ['warn', { commentPattern: /^no default$/ }])
    .end()
}

Package Sidebar

Install

npm i @berun/fluent-eslint

Weekly Downloads

2

Version

7.3.6

License

MPL-2.0

Unpacked Size

20.2 kB

Total Files

5

Last publish

Collaborators

  • tinialabs1
  • guycreate