npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-config-neo

v0.12.0

Published

Official Neo Financial ESLint configuration

Downloads

34,690

Maintainers

neo-matias-wengielneo-matias-wengielneo-daniel-brennanneo-daniel-brennanamievishwaamievishwaneoauderesantosneoauderesantosneo-matt-feliceneo-matt-feliceomolaraomolaradennisbartheldennisbarthelneo-rivan-motaneo-rivan-motalucachameckilucachameckiedward.nazarovedward.nazarovstephanie-wang-neostephanie-wang-neoluan.leluan.lear-iesar-iescjnewmancjnewmanneo-michal-kowalneo-michal-kowalneo-youre_penaneo-youre_penamichelepipernimichelepipernikyle-elyk-neokyle-elyk-neoamjad-mahfoud-neoamjad-mahfoud-neovidalrmrzvidalrmrzteena_teena_rnetto46rnetto46kaelanneofinancialkaelanneofinancialbriancruzbriancruziansuiansumaiko.trindademaiko.trindadedarrenpicard25darrenpicard25brayden_sc_neobrayden_sc_neomaxgoomaxgoostschmaltzstschmaltzusernamesebusernameseberic.zaporzan.neoeric.zaporzan.neolucasparreiralucasparreiralewishorwoodlewishorwoodcraigsiemenscraigsiemensdiegobmydiegobmyjoelsimpsonjoelsimpsonjooh-leejooh-leekasrababaeikasrababaeironellgarciaronellgarciapunit.patelpunit.patelneo-elgiz-abbasovneo-elgiz-abbasovhrishikeshkalehrishikeshkaleanna_benemanskaiaanna_benemanskaiahanna.tkachenkohanna.tkachenkou2v22u2v22neo-bclausineo-bclausinikita-syrotenkonikita-syrotenkojcavalcantijcavalcantijohnclendvoyjohnclendvoyneo-peter-spanglerneo-peter-spanglerdemaestrodemaestrodustinn1235dustinn1235daylan.lawdaylan.lawneo-stephenneo-stephenneogibsonneogibsonberakiberakivrochamaaiavrochamaaiad_fenniakd_fenniakadamtranquillaadamtranquillaroman.mnatsakanianroman.mnatsakaniannehasingh1801nehasingh1801lucaslongarinilucaslongarinierozonachierozonachifaddoulfaddouldivanshudivanshunpoltz-neonpoltz-neocaio.andradecaio.andraderishbarrishbardeankimdeankimtimothy.couch.neofinancialtimothy.couch.neofinancialbrentcambrentcammike.himbeault-neomike.himbeault-neostefan.amyottestefan.amyotteneo-travis-friesenneo-travis-friesenherculesjrherculesjrnahom-neonahom-neomatthew.belfordmatthew.belfordjoeljwoodjoeljwoodneo-rodrigoravalneo-rodrigoravalmalcolm-neomalcolm-neoneo-hasanpreetsinghneo-hasanpreetsinghscottkayeneoscottkayeneodhruvangdhruvangmohpormohporneo-baonguyenneo-baonguyenmohamedalhammoudmohamedalhammoudneo-seol-kimneo-seol-kimraul.ribeiroraul.ribeirolavanya.mohanlavanya.mohanmhowitt-neomhowitt-neobenx-neobenx-neoneo-dakota-chattneo-dakota-chattnico-connornico-connorvinicius-barcelosvinicius-barcelosrjberryrjberrynitin.madannitin.madandesmond-maloneydesmond-maloneymaiahneomaiahneolucasjohannsonlucasjohannsonmatheusicaromatheusicaromarcelo.matosmarcelo.matosstburkestburkeneodiegobeltranneodiegobeltranniconeimanniconeimanneo-barry-lineo-barry-lineo-ricardo-gomezneo-ricardo-gomezanhtranneoanhtranneoneo-dione-silvaneo-dione-silvatunde-neotunde-neoneo-miguel-castroneo-miguel-castroneobot1neobot1neo-bryce-brandfordneo-bryce-brandfordgaulfordgaulfordmarvindeleonmarvindeleondanielafekhume-neodanielafekhume-neokennethcolinakennethcolinaneo-paula-grangeironeo-paula-grangeirodas-bossdas-bossrhullyamrhullyamneo-ahmed-seifelnasrneo-ahmed-seifelnasrishmeet.rayatishmeet.rayatmsalamamsalamajadondubyjadondubybiancaballenabiancaballenaneo.eduardoyuidyneo.eduardoyuidyneo-shubham-patelneo-shubham-patelneo-will-parkerneo-will-parkerneo-chris-nobleneo-chris-nobleneo-diego-nunesneo-diego-nunesfelipe.minettofelipe.minettoneo-oleksandr-yanchenkoneo-oleksandr-yanchenkoneo-lior-ben-shaharneo-lior-ben-shaharneo-shruti-goyalneo-shruti-goyalantonio.canabravaantonio.canabravatim-neo2tim-neo2mganzneomganzneoneo-eason-changneo-eason-changneo-zhaoquan-zhangneo-zhaoquan-zhangneo-edimar-cardosoneo-edimar-cardosorajanatneorajanatneoneo-rameez-virjineo-rameez-virjineo-colin-hanlon-dearmanneo-colin-hanlon-dearmanalejandrogarbialejandrogarbimatt-armstrongmatt-armstrongleah-is-offlineleah-is-offlineannakumovaannakumovajimi487jimi487neo-tamika-taylorneo-tamika-taylorsamin_farajiansamin_farajianmahtab.khanmahtab.khanniloofarshsniloofarshsneo-julio-falboneo-julio-falbo

Keywords

Readme

eslint-config-neo

Official Neo Financial ESLint configuration

Available Configs

This package includes 4 different ESLint configs:

  • config-backend
  • config-frontend
  • config-backend-next
  • config-frontend-next

The next versions include some rules that are being considered for inclusion in future versions of the base config. The next configs also require you to specify the project setting in parserOptions for TypeScript projects. The will make ESLint run slower in TypeScript projects.

Relationships Between Configs

flowchart LR
    A[config-base]
    B[config-base-next]
    C[config-backend]
    D[config-frontend]
    E[config-backend-next]
    F[config-frontend-next]
    A --> C
    A --> D
    A --> B
    B --> E
    B --> F

The arrows from left to right illustrate which configs are extended by another config.

Installation

Install Package

npm install --save-dev eslint-config-neo

You can also install a specific version of the package by appending the version tag. For example, to install version 1.0.0

npm install --save-dev [email protected]

Install Peer Dependencies

npm install -D eslint prettier lint-staged husky typescript

Make ESLint Config File

Add .eslintrc to project root

{
  "extends": "eslint-config-neo/config-backend"
}

Use eslint-config-neo/config-frontend for frontend projects

Optional: Configure parserOptions with next configs

If you're using one of the next configs you must set the project option to include all of your tsconfig.json files:

{
  "extends": "eslint-config-neo/config-backend",
  "parserOptions": {
    "project": ["tsconfig.json", "test/tsconfig.json"]
  }
}

Make Prettier Config File

Add .prettierrc to project root

{
  "printWidth": 120,
  "singleQuote": true
}

Optional: If there are any files you want to exclude from Prettier add .prettierignore to project root

Make Editorconfig File

Add .editorconfig to project root

# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[COMMIT_EDITMSG]
max_line_length = 0

Add Engines

Add the engines field to package.json

"engines": {
  "node": "^12.0.0"
}

Add Scripts

Add scripts for linting and formatting to package.json

"scripts": {
  "lint": "eslint .",
  "format": "prettier --write \"**/*.{ts,tsx,js,json,graphql,md}\"",
  "format:check": "prettier --debug-check \"**/*.{ts,tsx,js,json,graphql,md}\""
}

Add Precommit Hook

Add a precommit hook to package.json to automatically lint and format any files staged for commit

"husky": {
  "hooks": {
    "pre-commit": "lint-staged"
  }
},
"lint-staged": {
  "concurrent": false,
  "linters": {
    "*.{ts,tsx,js}": [
      "eslint --quiet",
      "git add"
    ],
    "*.{ts,tsx,js,json,graphql,md}": [
      "prettier --write",
      "git add"
    ]
  }
}

Format Code

If you've added Prettier to an existing project you will want to format all the code. The precommit hook only updates files that have been changed and staged for commit. To format the entire codebase run

npm run format

On Upgrading to version 7 or higher

  • requires eslint version 8.26.0 or higher
  • for backend services, you should delete the domain-specific eslintrc

FAQ

Should I override the rule X? I don't like it.

No. If you want to do this, you have to ask the team. If a rule really doesn't make sense then we should remove or disable it.

Can I disable the rule on one line in my code, I have a good reason.

Yes. That's ok. Use a single-line disable.

Publishing

For Release

  1. Update the version in package.json
  2. Create a CHANGELOG entry
  3. Commit your changes
  4. npm pack --dry-run to see what will be published
  5. npm publish
  6. Create a release on GitHub. Use the version as the tag and release name. For example for version 1.0.0 the tag and release name would be v1.0.0. Add the CHANGELOG details to the release.

For Development

  1. Update the version in package.json to be postfixed with -next.x where x is a number
  • for example your first test version might look like 0.7.1-next.0, second test version would have next.1, etc
  1. run npm publish --canary --exact --preid canary --tag=canary
  2. In the project you wish to test in, run npm i eslint-config-neo@canary