Skip to content
/ linting Public

A collection of opinionated in-house linting rules.

License

Notifications You must be signed in to change notification settings

atmina/linting

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Oct 23, 2023
Mar 28, 2024
Mar 14, 2024
Sep 22, 2023
Mar 9, 2023
Sep 22, 2023
Mar 24, 2023
Mar 9, 2023
Oct 26, 2023
Mar 24, 2023
Jun 5, 2024
Jun 5, 2024
Apr 28, 2023
Sep 22, 2023

Repository files navigation

@atmina/linting

A collection of optionated in-house linting rules.

ESLint configuration is provided in the eslint.config.js, aka. "Flat Config" format.

Quickstart

  1. Install
    yarn add -D @atmina/linting
    # or
    pnpm add -D @atmina/linting
  2. Run the CLI tool
    yarn linting
    # or
    pnpm linting
    This will set up the necessary dependencies and configurations for you.

IDE Integration

In VS Code, use these workspace settings:

{
  "eslint.experimental.useFlatConfig": true,
  "eslint.workingDirectories": [
    // In a monorepo, specify linted packages here
    "frontend"
  ],
  // Optional
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  }
}

In WebStorm, go to Settings and enable ESLint (Select "Automatic ESLint Configuration"). If desired, enable "Run eslint --fix on Save".

Development

When working on linting, it may be useful to test its effects in a different project. To do so, link your local copy of linting in the other project's package.json (works with pnpm and yarn). This may require restarting your IDE once after setting up the link.

{
  "devDependencies": {
    "@atmina/linting": "link:local/path/to/linting"
  }
}