Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-appnexus

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-appnexus

AppNexus Standard Eslint Config

  • 6.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
620
increased by258.38%
Maintainers
3
Weekly downloads
 
Created
Source

eslint-config-appnexus

Installation

npm install eslint-config-appnexus --save-dev

# Additional plugins needed
npm install eslint-plugin-import --save-dev
npm install eslint-plugin-lodash --save-dev
npm install eslint-plugin-promise --save-dev
npm install eslint-plugin-prettier --save-dev
npm install --save-dev --save-exact prettier

Create a .prettierrc file in the project root with the standard overrides:

{
  "printWidth": 120,
  "singleQuote": true,
  "arrowParens": "always",
  "semi": true,
  "trailingComma": "all"
}
  • Semver Policy
  • Change Log

Configure .eslintrc.json

Base

View Config

{
	"extends": ["appnexus"]
}

Base + UI Rules

View Config

{
	"extends": ["appnexus/frontend"]
}

Additional installs

npm install eslint-plugin-react --save-dev

Base + Backend Rules

View Config

{
	"extends": ["appnexus/backend"]
}

Additional installs

npm install eslint-plugin-hapi --save-dev

Typescript Base

View Config

{
	"extends": ["appnexus/typescript"]
}

Additional installs

npm install @typescript-eslint/eslint-plugin@latest --save-dev
npm install eslint-plugin-import@latest --save-dev

package.json scripts:

	"lint": "eslint --ext .js,.jsx,.ts,.tsx src",
	"lint-fix": "eslint --ext .js,.jsx,.ts,.tsx src --fix",

Overriding rules

To override rules for your project use the rules section of the .eslintrc.json file

Example overriding indentation to 2 spaces:
{
	"extends": ["appnexus"],
	"rules": {
		"indent": ["error", 2]
	}
}
Example of adding mocha defined functions:
{
	"env": {
		"mocha": true
	},
	"extends": ["appnexus"]
}

Rule Changes

See the wiki for the semver policy for this project. Please propose rule changes as an issue in this repo.

Find Unused Rules

npm run find-unused-rules -- base.js
npm run find-unused-rules -- frontend.js
npm run find-unused-rules -- backend.js

Keywords

FAQs

Package last updated on 10 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc