Skip to content

Skip linting of submodules #29

Open
@Amxx

Description

Right now, the linter is configures as:

"lint": "npm run lint:js && npm run lint:sol",
"lint:fix": "npm run lint:js:fix && npm run lint:sol:fix",
"lint:js": "prettier --log-level warn --ignore-path .gitignore '**/*.{js,ts}' --check",
"lint:js:fix": "prettier --log-level warn --ignore-path .gitignore '**/*.{js,ts}' --write",
"lint:sol": "prettier --log-level warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --check",
"lint:sol:fix": "prettier --log-level warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --write",

While the solidity parts only run on contracts and test, the javascript/typescript part runs on all subfolders. This includes lib/* that contains the @openzeppelin/contracts submodules. These module include some javascript and typescript (tests, scripts, ...) thatare linted using a potentially different version/config of prettier.

This forces us to use the same prettier version/config as the main repos, which means we have to synchronise the updates.

We should configure linting in this repo so that lib/* is NOT linted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions