├── eslint.config.js
├── .gitignore
├── .npmrc
├── prettier.config.js
├── tsconfig.build.json
├── renovate.json
├── tsconfig.json
├── docs
└── rules
│ ├── no-unnecessary-for-and-id.md
│ ├── no-unnecessary-html-attributes.md
│ ├── no-unnecessary-interpolations.md
│ └── no-submit-handler-without-preventDefault.md
├── index.ts
├── package.json
├── rules
├── no-unnecessary-interpolations.ts
├── no-unnecessary-html-attributes.ts
├── no-unnecessary-for-and-id.ts
└── no-submit-handler-without-preventDefault.ts
├── .github
└── workflows
│ └── lint-and-check-types.yml
└── pnpm-lock.yaml
/eslint.config.js:
--------------------------------------------------------------------------------
1 | export { default } from 'eslint-config-upleveled';
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .eslintcache
3 | index.js
4 | rules/*.js
5 | *.tsbuildinfo
6 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | exact=true
2 |
3 | # Fail on pnpm ignored build scripts
4 | # - https://github.com/pnpm/pnpm/pull/9071
5 | strict-dep-builds=true
6 |
--------------------------------------------------------------------------------
/prettier.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('prettier').Config} */
2 | const config = {
3 | singleQuote: true,
4 | trailingComma: 'all',
5 | };
6 |
7 | export default config;
8 |
--------------------------------------------------------------------------------
/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "extends": "./tsconfig.json",
4 | "compilerOptions": {
5 | "noEmit": false
6 | },
7 | "exclude": ["eslint.config.js", "prettier.config.js"]
8 | }
9 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "github>karlhorky/renovate-config:default.json5"
4 | ],
5 | "packageRules": [
6 | {
7 | "matchDepTypes": [
8 | "peerDependencies"
9 | ],
10 | "rangeStrategy": "bump"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "extends": "eslint-config-upleveled/tsconfig.base.json",
4 | "compilerOptions": {
5 | "checkJs": true
6 | },
7 | "include": [
8 | "**/*.ts",
9 | "**/*.tsx",
10 | "**/*.js",
11 | "**/*.jsx",
12 | "**/*.cjs",
13 | "**/*.mjs"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/docs/rules/no-unnecessary-for-and-id.md:
--------------------------------------------------------------------------------
1 | # Prevent unnecessary `for` and `id` attributes on input elements nested in labels (upleveled/no-unnecessary-for-and-id)
2 |
3 | When an `` element is nested inside a `