- Notifications
You must be signed in to change notification settings - Fork10
A comprehensive linting solution that sweeps your code clean. Fly through your codebase with ease and precision!
License
dipiash/eslint-plugin-nimbus-clean
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A comprehensive linting solution that sweeps your code clean. Combined rules for ESLint helps to produce high quality code by detecting suspicious patterns, bugs. Keep the code clean and consistent.
Requires ESLint>=9.20.0,flat config, andESM.
Here you can find instructions how to install it via:npm,yarn,pnpm.
You'll first need to installESLint and TypeScript:
npm i eslint --save-devnpm i typescript# Or run this to use yarnyarn add eslint --devyarn add typescript# Or run this to use pnpmpnpm add eslint --save-devpnpm add typescript
Next, installeslint-plugin-nimbus-clean:
npm install eslint-plugin-nimbus-clean --save-dev# Or run this to use yarnyarn add eslint-plugin-nimbus-clean --dev# Or run this to use pnpmpnpm add eslint-plugin-nimbus-clean --save-dev
Next, install all peerDependencies for this plugin:
npx install-peerdeps eslint-plugin-nimbus-clean# Or run this to use yarnnpx install-peerdeps eslint-plugin-nimbus-clean --yarn# Or run this to use pnpmnpx install-peerdeps eslint-plugin-nimbus-clean --pnpm
Suitable for ESLint >= 9
eslint.config.mjs fromjavascript project
importnimbusCleanPluginfrom"eslint-plugin-nimbus-clean";importglobalsfrom"globals";constconfig=[ ...nimbusCleanPlugin.configs.recommended,// Other configs{ignores:["dist"]},{files:["**/*.{js,jsx}"],languageOptions:{ecmaVersion:2020,globals:globals.browser,parserOptions:{ecmaFeatures:{jsx:true},ecmaVersion:"latest",sourceType:"module",},},},];exportdefaultconfig;
eslint.config.mjs fromtypescript project
importnimbusCleanPluginfrom"eslint-plugin-nimbus-clean";importglobalsfrom"globals";importtsLintfrom"typescript-eslint";exportdefaulttsLint.config( ...nimbusCleanPlugin.configs.recommended,// Other configs{ignores:["dist"]},{files:["**/*.{ts,tsx}"],languageOptions:{ecmaVersion:2020,globals:globals.browser,},},{settings:{"import/resolver":{node:true,typescript:true,},},},);
If you have existing project big/old/etc. you can applynimbus-clean config setting incrementally:
nimbusCleanPlugin.configs.commonnimbusCleanPlugin.configs.prettiernimbusCleanPlugin.configs.importnimbusCleanPlugin.configs.simpleImportSortnimbusCleanPlugin.configs.reactnimbusCleanPlugin.configs.reactHooksnimbusCleanPlugin.configs.jsxA11ynimbusCleanPlugin.configs.promisenimbusCleanPlugin.configs.unicornnimbusCleanPlugin.configs.sonarjsnimbusCleanPlugin.configs.typescriptnimbusCleanPlugin.configs.perfectionistnimbusCleanPlugin.configs.testingLibrary
eslint.config.mjs fromjavascript project
importnimbusCleanPluginfrom"eslint-plugin-nimbus-clean";importglobalsfrom"globals";constconfig=[ ...nimbusCleanPlugin.configs.common, ...nimbusCleanPlugin.configs.prettier,// Other configs{ignores:["dist"]},{files:["**/*.{js,jsx}"],languageOptions:{ecmaVersion:2020,globals:globals.browser,parserOptions:{ecmaFeatures:{jsx:true},ecmaVersion:"latest",sourceType:"module",},},},];exportdefaultconfig;
eslint.config.mjs fromtypescript project
importnimbusCleanPluginfrom"eslint-plugin-nimbus-clean";importglobalsfrom"globals";importtsLintfrom"typescript-eslint";exportdefaulttsLint.config( ...nimbusCleanPlugin.configs.common, ...nimbusCleanPlugin.configs.prettier,// Other configs{ignores:["dist"]},{files:["**/*.{ts,tsx}"],languageOptions:{ecmaVersion:2020,globals:globals.browser,},},{settings:{"import/resolver":{node:true,typescript:true,},},},);
For flexible customization you can also use separate rules in your configs:
nimbusCleanPlugin.rules.recommendednimbusCleanPlugin.rules.commonnimbusCleanPlugin.rules.importnimbusCleanPlugin.rules.sonarjsnimbusCleanPlugin.rules.prettiernimbusCleanPlugin.rules.reactnimbusCleanPlugin.rules.reactHooksnimbusCleanPlugin.rules.reactRefreshnimbusCleanPlugin.rules.promisenimbusCleanPlugin.rules.unicornnimbusCleanPlugin.rules.perfectionistnimbusCleanPlugin.rules.typescriptRules
eslint.config.mjs fromjavascript project
importnimbusCleanPluginfrom"eslint-plugin-nimbus-clean";importglobalsfrom"globals";constconfig=[ ...({ ...nimbusCleanPlugin.configs.common,rules:{ ...nimbusCleanPlugin.rules.common,// Your rules}}), ...nimbusCleanPlugin.configs.prettier,// Other configs{ignores:["dist"]},{files:["**/*.{js,jsx}"],languageOptions:{ecmaVersion:2020,globals:globals.browser,parserOptions:{ecmaFeatures:{jsx:true},ecmaVersion:"latest",sourceType:"module",},},},];exportdefaultconfig;
eslint.config.mjs fromtypescript project
importnimbusCleanPluginfrom"eslint-plugin-nimbus-clean";importglobalsfrom"globals";importtsLintfrom"typescript-eslint";exportdefaulttsLint.config( ...({ ...nimbusCleanPlugin.configs.common,rules:{ ...nimbusCleanPlugin.rules.common,// Your rules}}),// OR{rules:{ ...nimbusClean.rules.typescript,},},// Other configs{ignores:["dist"]},{files:["**/*.{ts,tsx}"],languageOptions:{ecmaVersion:2020,globals:globals.browser,},},{settings:{"import/resolver":{node:true,typescript:true,},},},);
If you don't have a.prettierrc config, please add it (for example):
{ "singleQuote": true, "printWidth": 150, "useTabs": false, "tabWidth": 2, "trailingComma": "all", "semi": false }This code is licensed under theMIT License.
Before making any contributions, refer tohere.
Star (⭐️) this repository if it helped you!
Thanks go to these wonderful people:
About
A comprehensive linting solution that sweeps your code clean. Fly through your codebase with ease and precision!
Topics
Resources
License
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors12
Uh oh!
There was an error while loading.Please reload this page.