Salesforce eslint configuration for all projects.
First install this package.
yarn add eslint-config-salesforce
Then extend this configuration in your own eslint file.
Here is an example using a .eslintrc.js
file.
module.exports = {
extends: ['eslint-config-salesforce'],
};
Because eslint requires all eslint packages locally, you must also install the following packages.
yarn add eslint eslint-plugin-import eslint-plugin-jsdoc
For Salesforce owned repositories, also extend eslint-config-salesforce-license;
Note: For typescript packages, use eslint-config-salesforce-typescript.