UdeS-STI / eslint-config-udes

ESLint shareable config for the UdeS JavaScript style guide
MIT License
0 stars 0 forks source link
config configuration eslint eslint-config hacktoberfest udes

eslint-config-udes

npm Known Vulnerabilities CircleCI

ESLint shareable config for the UdeS JavaScript style guide.

Installation

npm install eslint-config-udes --save-dev

Our default export use some plugins that you need to install as well:

npm install prettier eslint-plugin-prettier eslint-plugin-json-format eslint-plugin-markdown --save-dev

Usage (by default)

module.exports = {
  // Extends the UdeS ESLint config
  extends: 'eslint-config-udes',

  // Limit ESLint to a specific project
  root: true,
};

Scripts

{
  "scripts": {
    "format": "npm run lint -- --fix",
    "lint": "eslint . --ext js,json,md"
  }
}

Supported languages/frameworks

module.exports = {
  // Extends the UdeS ESLint config for lit-html application
  extends: 'eslint-config-udes/lit-html',

  // Extends the UdeS ESLint config for Node.js 16 application
  extends: 'eslint-config-udes/node-16',

  // Extends the UdeS ESLint config for React application and element
  extends: 'eslint-config-udes/react',
};

Installation

As these configurations use other plugins, you may need to install additional devDependencies:

# lit-html
npm install babel-eslint eslint-plugin-html eslint-plugin-lit --save-dev

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

Publish

Increment the version defined in the package.json file and run the command below to publish the module in the registry:

# Dry run
npm publish --dry-run

# For real (are you really sure?)
npm publish

License

The MIT License (MIT)