eslint-config-ryanair

1.2.0 • Public • Published

Ryanair linter rules

Common eslint rules used in Ryanair's projects.

How to use it

  npx install-peerdeps --dev eslint-config-ryanair

Then in your .eslintrc

{
  "extends": "eslint-config-ryanair"
}

Format on save

There is an eslint rule to enforce the usage of prettier with some specific configuration. If you run prettier through your text editor it won't find the configuration and it will format differently than eslint auto fix option.

In order to fix this, disable format on save for typescript and html files and leave only eslint auto fix for those types of files.

In VSCode the config looks like this:

{
  "editor.formatOnSave": true,
  "[typescript]": {
    "editor.formatOnSave": false
  },
  "[html]": {
    "editor.formatOnSave": false
  },

  "eslint.options": {
    "extensions": [".ts", ".html"]
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "html"
  ],

  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

Package Sidebar

Install

npm i eslint-config-ryanair

Weekly Downloads

79

Version

1.2.0

License

MIT

Unpacked Size

14.8 kB

Total Files

5

Last publish

Collaborators

  • fortunatof
  • izifortune