eslint-config-nayya
v0.7.0
Published
Shared JavaScript/TypeScript code styles
Downloads
924
Keywords
Readme
Shared ESLint/Prettier/TypeScript configs
How to use this config in your project
Install the package
npx install-peerdeps --yarn --dev eslint-config-nayya
Create your
.eslintrc.js
module.exports = { extends: 'eslint-config-nayya' };
Create your
.prettierrc.js
module.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 test
NOTE: 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