3.4.1 • Published 5 months ago

@vervocity/eslint-config v3.4.1

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Vervocity JS Coding Standard

Installation

!NOTE
All eslint configurations are setup to be used with prettier.

npm install --save-dev @vervocity/eslint-config

Create eslint.config.mjs file.

import { eslint } from '@vervocity/eslint-config'

export default eslint.standard

Create prettier.config.mjs

import { prettier } from '@vervocity/eslint-config'

export default prettier.standard

Create a .prettierignore to ignore files from prettier.

*.md

Usage

npx prettier resources/js --check
npx eslint "resources/js/**/*.{js,ts,vue}"

If desired, add the following to your package.json. Make sure to update the resources path to the correct location.

"scripts" {
    "lint": "npx eslint resources",
    "lint:fix": "npm run lint -- --fix",
    "prettier": "npx prettier resources",
    "prettier:fix": "npm run prettier -- --write",
    "format": "npm run prettier:fix && npm run lint:fix",
}

Then run the following to format your entire codebase.

npm run format

VS Code

Extensions

Settings.json

{
    // Disable since we will be using `editor.codeActionsOnSave` instead
    "editor.formatOnSave": false,
    "eslint.format.enable": false,

    // Set the default formatter to prettier
    "editor.defaultFormatter": "esbenp.prettier-vscode",

    // Runs Prettier, then ESLint
    "editor.codeActionsOnSave": [
        // `source.formatDocument` will first run the defaultFormatter
        "source.formatDocument",
        // Then run eslint after prettier
        "source.fixAll.eslint"
    ]
}
3.4.1

5 months ago

3.3.0

10 months ago

3.2.1

10 months ago

3.2.0

10 months ago

3.1.1

10 months ago

3.1.0

10 months ago

3.0.1

10 months ago

3.0.0

10 months ago

2.1.3

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.0

3 years ago

1.0.0

5 years ago