2.0.0 • Published 1 month ago

@allenai/eslint-config-varnish v2.0.0

Weekly downloads
233
License
Apache-2.0
Repository
github
Last release
1 month ago

ESLint Config Varnish

The files in this directory represent the eslint configuration settings for Varnish. They also have the eslint rules for MUI folded in.

They will be published as a separate NPM module, @allenai/eslint-config-varnish. This allows them to be shared easily across multiple AI2 projects.

For more information about publishing and using shared eslint configuration definitions, see this documentation.

Usage

  1. Install it and it's peer dependencies:

    ~ yarn add @allenai/eslint-config-varnish \
        @typescript-eslint/eslint-plugin \
        @typescript-eslint/parser \
        eslint \
        eslint-config-prettier \
        eslint-config-standard \
        eslint-plugin-import \
        eslint-plugin-jsx-a11y \
        eslint-plugin-mdx \
        eslint-plugin-node \
        eslint-plugin-prettier \
        eslint-plugin-promise \
        eslint-plugin-react \
        eslint-plugin-standard \
        prettier
  2. Create a file with patterns specifying stuff you'd like to ignore:

    ~ cat <<EOF > .eslintignore
    .next/
    node_modules/
    package.json
    tsconfig.json
    EOF
  3. Create a config file, and configure eslint to use this package as a base:

    cat <<EOF > .eslintrc.js
    module.exports = {
        extends: [ "@allenai/eslint-config-varnish" ]
    };
    EOF
  4. Add targets for linting and reformatting code to your package.json file:

    "scripts": {
        "lint": "eslint '**/*.{js,ts,tsx,json}' && echo '💫  Lint complete.'",
        "lint:fix": "eslint '**/*.{js,ts,tsx,json}' --fix && echo '🛠  Lint --fix complete.'",
    }
  5. Try it out:

    # See what's wrong
    ~ yarn lint
    
    # Reformat and fix things
    ~ yarn lint:fix

Documentation

The documentation

Contributing

See instructions at the monorepo root CONTRIBUTING

2.0.0

1 month ago

1.3.0

2 months ago

1.2.9

2 months ago

1.2.3-alpha.0

3 months ago

1.2.2

3 months ago

1.2.1

3 months ago

1.1.1

1 year ago

1.1.0

2 years ago

1.0.7-alpha.0

2 years ago

1.0.6-alpha.0

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

5 years ago