0.7.0 • Published 4 years ago
eslint-config-nayya v0.7.0
Shared ESLint/Prettier/TypeScript configs
How to use this config in your project
Install the package
npx install-peerdeps --yarn --dev eslint-config-nayyaCreate your
.eslintrc.jsmodule.exports = { extends: 'eslint-config-nayya' };Create your
.prettierrc.jsmodule.exports = require('eslint-config-nayya/prettier.config');Create your
tsconfig.json{ "extends": "eslint-config-nayya/tsconfig.json", "include": ["src"] }NOTE: Replace "src" with the directory or directories that contain your TypeScript source.
If you get an error about not being able to find
tsconfig.json, try this instead for.eslintrc.js:const config = require('eslint-config-nayya'); config.parserOptions.tsconfigRootDir = __dirname; module.exports = config;
Development
Use yarn link or yalc to test changes locally.
Add tests in test/ with the extension .test.ts or .test.tsx.
To run tests:
yarn testNOTE: ESLint may output errors for files like .eslintrc.js in this repository. Use the test/ directory to test the linting.
Publishing
# To log in to npmjs.com
yarn login
# To publish a patch version
yarn publish --patch
# To publish a minor version
yarn publish --minor
# To publish a major version
yarn publish --major