Skip to content

Mirror of eslint node package for pre-commit.

License

Notifications You must be signed in to change notification settings

pre-commit/mirrors-eslint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint mirror

Mirror of eslint package for pre-commit.

For pre-commit: see https://github.com/pre-commit/pre-commit

For eslint: see https://github.com/eslint/eslint

Using eslint with pre-commit

Add this to your .pre-commit-config.yaml:

-   repo: https://github.com/pre-commit/mirrors-eslint
    rev: ''  # Use the sha / tag you want to point at
    hooks:
    -   id: eslint

When using plugins with eslint you'll need to declare them under additional_dependencies. For example:

-   repo: https://github.com/pre-commit/mirrors-eslint
    rev: ''  # Use the sha / tag you want to point at
    hooks:
    -   id: eslint
        additional_dependencies:
        -   [email protected]
        -   [email protected]
        -   [email protected]
        -   [email protected]
        -   [email protected]

By default only *.js files are taken into consideration. If you want to use eslint on TypeScript codebases you need to start from this template:

-   repo: https://github.com/pre-commit/mirrors-eslint
    rev: ''  # Use the sha / tag you want to point at
    hooks:
    -   id: eslint
        files: \.[jt]sx?$  # *.js, *.jsx, *.ts and *.tsx
        types: [file]