@shelf/eslint-config

ESLint Config for Shelf Projects

Usage no npm install needed!

<script type="module">
  import shelfEslintConfig from 'https://cdn.skypack.dev/@shelf/eslint-config';
</script>

README

@shelf/eslint-config

Install

$ yarn add @shelf/eslint-config --dev

Usage

Backend

{
  "extends": ["@shelf/eslint-config/typescript"]
}

TypeScript .eslintrc

{
  "extends": ["@shelf/eslint-config/typescript"]
}

Frontend

JavaScript with React .eslintrc

{
  "extends": ["@shelf/eslint-config/frontend"],
  "settings": {
    "react": {
      "version": "16.7.0"
    }
  },
  "rules": {
    "react/prop-types": "warn"
  }
}

TypeScript or TypeScript + Next .eslintrc

{
  "extends": ["@shelf/eslint-config/frontend-typescript"],
  "settings": {
    "react": {
      "version": "16.7.0"
    }
  },
  "rules": {
    "react/prop-types": "warn"
  }
}

Vue .eslintrc

{
  "extends": ["@shelf/eslint-config/frontend-vue"],
  "rules": {
    "no-unused-vars": ["error", {"vars": "all", "argsIgnorePattern": "^hquot;}]
  }
}

Typescript with Vue .eslintrc

{
  "extends": ["@shelf/eslint-config/frontend-typescript-vue"],
  "rules": {
    "@typescript-eslint/no-unused-vars": ["error", {"vars": "all", "argsIgnorePattern": "^hquot;}]
  }
}

React with testing-library .eslintrc

{
  "extends": ["@shelf/eslint-config/frontend-testing-library"],
  "rules": {
    "testing-library/no-wait-for-empty-callback": "error",
    "testing-library/no-await-sync-query": "error"
  }
}

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags

License

MIT © Shelf