This package has been deprecated

Author message:

WARNING: This project has been renamed to @flyyer/eslint-config. Install using @flyyer/eslint-config instead. https://npmjs.com/package/@flyyer/eslint-config

@flayyer/eslint-config

1.1.3 • Public • Published

@flayyer/eslint-config

Please use this configuration to maintain a common and homogeneous code base.

Install

Install this package as any other package with:

yarn add --dev @flayyer/eslint-config eslint prettier

Create a .eslintignore and add any files that are bundled, builded and/or transpiled:

!.eslintrc.js

.vscode
.next
dist
public
node_modules

In the package.json file add the following in the "scripts" section:

 {
   // ...
   "scripts": {
     // ...
     "lint": "eslint '*/**/*.{js,ts,tsx}'",
   },
 }

Configure for Javascript

Create a .eslintrc.js file in the root of your project and add the following:

// .eslintrc.js
module.exports = {
  extends: [
    "@flayyer/eslint-config",
    "@flayyer/eslint-config/jest",
    "@flayyer/eslint-config/prettier",
  ],
};

Configure for Typescript

Create a .eslintrc.js file in the root of your project and add the following:

// .eslintrc.js
module.exports = {
  extends: [
    "@flayyer/eslint-config",
    "@flayyer/eslint-config/typescript",
    "@flayyer/eslint-config/jest",
    "@flayyer/eslint-config/prettier",
  ],
};

Configure for React + Typescript

Create a .eslintrc.js file in the root of your project and add the following:

// .eslintrc.js
module.exports = {
  extends: [
    "@flayyer/eslint-config",
    "@flayyer/eslint-config/typescript",
    "@flayyer/eslint-config/react",
    "@flayyer/eslint-config/jest",
    "@flayyer/eslint-config/prettier",
  ],
};

Usage

To lint the files run:

yarn lint

To lint the files and auto-format run:

yarn lint --fix

Setup Visual Studio Code

Create file .vscode/settings.json

mkdir -p .vscode
touch .vscode/settings.json

Add the following:

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

Publishing

To make changes to this package run:

yarn link
yarn link '@flayyer/eslint-config'

To publish and update of this package run:

# git add ...
# git commit ...

git push --follow-tags
yarn publish --access=public

Unlink this package:

yarn unlink '@flayyer/eslint-config'
yarn unlink

Readme

Keywords

none

Package Sidebar

Install

npm i @flayyer/eslint-config

Weekly Downloads

2

Version

1.1.3

License

MIT

Unpacked Size

9.33 kB

Total Files

9

Last publish

Collaborators

  • francomendez
  • lopezjurip