- If you don't already have a
package.json
file, create one withnpm init
. - Then install everything needed by the config:
npx install-peerdeps --dev eslint-config-ts-anaet
- If you have successfully installed. Then create a
.eslintrc
or.eslintrc.js
file in the root of your project's directory (it should live where package.json does). Your.eslintrc
or.eslintrc.js
file should look like this:
{
"extends": ["ts-anaet"],
"parserOptions": {
"project": ["tsconfig.json"]
}
}
or
module.exports = {
extends: ["ts-anaet"],
parserOptions: {
project: ["tsconfig.json"]
}
};
- You can add two scripts to your
package.json
to lint and/or fix:
"scripts": {
"lint": "eslint '*/**/*.{js,ts}' --quiet",
"lint:fix": "eslint '*/**/*.{js,ts}' --quiet --fix"
},