-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from vcian/development
Added Support for Angular and Nestjs along with Docs
- Loading branch information
Showing
30 changed files
with
882 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": [ | ||
"projects/**/*" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.ts" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates", | ||
"plugin:@typescript-eslint/eslint-recommended" | ||
], | ||
"rules": { | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "app", | ||
"style": "camelCase" | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "app", | ||
"style": "kebab-case" | ||
} | ||
], | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 120 | ||
} | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"warn", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
} | ||
} | ||
], | ||
"no-magic-numbers": [ | ||
"warn", | ||
{ | ||
"ignoreArrayIndexes": true, | ||
"ignoreDefaultValues": true, | ||
"ignoreClassFieldInitialValues": true, | ||
"ignore": [ | ||
-1, | ||
0, | ||
1 | ||
] | ||
} | ||
], | ||
"no-console": "error", | ||
"no-extra-boolean-cast": "off" | ||
} | ||
}, | ||
{ | ||
"files": [ | ||
"*.html" | ||
], | ||
"extends": [ | ||
"plugin:@angular-eslint/template/recommended", | ||
"plugin:@angular-eslint/template/accessibility" | ||
], | ||
"rules": { | ||
"prefer-template": 1 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"**/*.{js,ts}": [ | ||
"eslint --fix", | ||
"prettier --config ./.prettierrc.json --write" | ||
], | ||
"**/*.{css,scss,md,html,json}": [ | ||
"prettier --config ./.prettierrc.json --write" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"semi": true, | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"**/*.css", | ||
"**/*.scss", | ||
"**/*.html" | ||
], | ||
"options": { | ||
"singleQuote": false | ||
} | ||
} | ||
] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
.next | ||
.cache | ||
package-lock.json | ||
dist | ||
public | ||
node_modules | ||
next-env.d.ts | ||
next.config.ts | ||
next.config.ts | ||
/.angular/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'error', | ||
'@typescript-eslint/explicit-module-boundary-types': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
'@typescript-eslint/no-invalid-this': 'off', | ||
'@typescript-eslint/no-unused-expressions': 'warn', | ||
'@typescript-eslint/return-await': 'warn', | ||
'@typescript-eslint/member-ordering': 'off', | ||
'@typescript-eslint/promise-function-async': 'error', | ||
'@typescript-eslint/prefer-optional-chain': 'error', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ selector: 'default', format: ['strictCamelCase'] }, | ||
{ | ||
selector: 'variable', | ||
format: ['strictCamelCase', 'UPPER_CASE', 'PascalCase'], | ||
}, | ||
{ | ||
selector: 'parameter', | ||
modifiers: ['unused'], | ||
format: ['strictCamelCase'], | ||
leadingUnderscore: 'allow', | ||
}, | ||
{ selector: 'property', format: null }, | ||
{ selector: 'typeProperty', format: null }, | ||
{ selector: 'typeLike', format: ['StrictPascalCase'] }, | ||
{ selector: 'enumMember', format: ['UPPER_CASE'] }, | ||
], | ||
'no-useless-return': 'error', | ||
'no-constant-condition': 'warn', | ||
'max-len': [ | ||
'error', | ||
{ | ||
code: 200, | ||
}, | ||
], | ||
'max-lines': [ | ||
'error', | ||
{ | ||
max: 1000, | ||
}, | ||
], | ||
'no-multiple-empty-lines': [ | ||
'error', | ||
{ | ||
max: 2, | ||
maxEOF: 1, | ||
}, | ||
], | ||
'no-console': 'error', | ||
'no-mixed-operators': 'error', | ||
'keyword-spacing': 'error', | ||
'multiline-ternary': ['error', 'never'], | ||
'no-undef': 'error', | ||
'no-whitespace-before-property': 'error', | ||
'nonblock-statement-body-position': 'error', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"{src,apps,libs,test}/**/*.ts": [ | ||
"eslint --fix", | ||
"prettier --config ./.prettierrc --write" | ||
], | ||
"{src,apps,libs,test}/**/*.json": [ | ||
"prettier --config ./.prettierrc --write" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"singleQuote": true, | ||
"semi": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"printWidth": 80, | ||
"endOfLine": "auto" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# ESLint Configuration (.eslintrc.json) | ||
|
||
## Overview | ||
|
||
The `.eslintrc.json` file is used with ESLint, a JavaScript and TypeScript linter, to enforce coding standards, catch errors, and maintain a consistent codebase. | ||
|
||
The `.eslintrc.json` file is essential for enforcing coding standards and maintaining a consistent codebase in TypeScript and Angular projects. Customize based on project requirements. | ||
|
||
### `root` | ||
|
||
- **Description:** Indicates that this `.eslintrc.json` is the root configuration file. | ||
- **Value:** `true` | ||
|
||
### `ignorePatterns` | ||
|
||
- **Description:** Defines patterns for files and directories to be ignored by ESLint. | ||
- **Value:** | ||
- `projects/**/*`: Ignores all files under the `projects` directory. | ||
|
||
### `overrides` | ||
|
||
#### TypeScript Files (`*.ts`) | ||
|
||
- **Description:** Configuration specifically for TypeScript files. | ||
|
||
- `extends` | ||
- `eslint:recommended`: Inherits recommended ESLint rules. | ||
- `plugin:@typescript-eslint/recommended`: Includes recommended TypeScript ESLint rules. | ||
- `plugin:@angular-eslint/recommended`: Integrates recommended Angular ESLint rules. | ||
- `plugin:@angular-eslint/template/process-inline-templates`: Handles inline template processing for Angular. | ||
- `plugin:@typescript-eslint/eslint-recommended`: Recommends ESLint rules for TypeScript from TypeScript ESLint. | ||
|
||
- `rules` | ||
- `@angular-eslint/directive-selector`: Specifies directives' naming conventions. | ||
- `@angular-eslint/component-selector`: Specifies component naming conventions. | ||
- `max-len`: Sets maximum line length to 120 characters. | ||
- `semi`: Enforces the usage of semicolons. | ||
- `@typescript-eslint/member-delimiter-style`: Specifies member delimiter style for TypeScript. | ||
- `no-magic-numbers`: Disallows magic numbers except for specific cases. | ||
- `no-console`: Disallows the usage of `console` statements. | ||
- `no-extra-boolean-cast`: Allows extra boolean casts. | ||
|
||
#### HTML Files (`*.html`) | ||
|
||
- **Description:** Configuration specifically for HTML files. | ||
|
||
- `extends` | ||
- `plugin:@angular-eslint/template/recommended`: Incorporates recommended Angular template ESLint rules. | ||
- `plugin:@angular-eslint/template/accessibility`: Focuses on template accessibility rules. | ||
|
||
- `rules` | ||
- `prefer-template`: Encourages the use of template literals in HTML. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# lint-staged Configuration (.lintstagedrc.json) | ||
|
||
## Overview | ||
|
||
The `.lintstagedrc.json` file configures lint-staged, a Git pre-commit hook tool, to run specific tasks on files that are staged for commit. | ||
|
||
The `.lintstagedrc.json` file optimizes the pre-commit process by focusing linting and formatting tasks on staged files. Customize the configuration based on project requirements and coding conventions. | ||
|
||
### Configuration Details | ||
|
||
- **Pattern: `**/\*.{js,ts}`** | ||
|
||
- **Description:** Targets JavaScript and TypeScript files for linting and formatting. | ||
- **Tasks:** | ||
- `eslint --fix`: Runs ESLint with the fix option to automatically correct linting issues. | ||
- `prettier --config ./.prettierrc.json --write`: Runs Prettier with a specific configuration file to format code. | ||
|
||
- **Pattern: `**/\*.{css,scss,md,html,json}`** | ||
- **Description:** Targets CSS, SCSS, Markdown, HTML, and JSON files for formatting. | ||
- **Task:** | ||
- `prettier --config ./.prettierrc.json --write`: Runs Prettier with a specific configuration file to format code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Prettier Configuration (.prettierrc.json) | ||
|
||
## Overview | ||
|
||
The `.prettierrc.json` file is used with Prettier, a code formatter, to define code styling rules and formatting options. | ||
|
||
The `.prettierrc.json` file sets Prettier formatting rules, ensuring code consistency and adherence to styling preferences. Customize these settings according to project requirements and coding conventions. | ||
|
||
|
||
### `printWidth` | ||
|
||
- **Description:** Specifies the maximum line width before wrapping. | ||
- **Value:** `80` | ||
|
||
### `tabWidth` | ||
|
||
- **Description:** Specifies the number of spaces per indentation-level. | ||
- **Value:** `2` | ||
|
||
### `trailingComma` | ||
|
||
- **Description:** Controls the usage of trailing commas in object literals and arrays. | ||
- **Value:** `"es5"` | ||
|
||
### `singleQuote` | ||
|
||
- **Description:** Defines whether to use single quotes instead of double quotes for strings. | ||
- **Value:** `true` | ||
|
||
### `semi` | ||
|
||
- **Description:** Indicates whether to add a semicolon at the end of statements. | ||
- **Value:** `true` | ||
|
||
### `bracketSpacing` | ||
|
||
- **Description:** Controls whether to add spaces inside object literals' curly braces. | ||
- **Value:** `true` | ||
|
||
### `endOfLine` | ||
|
||
- **Description:** Specifies the type of line endings. | ||
- **Value:** `"lf"` | ||
|
||
### `overrides` | ||
|
||
- **Description:** Allows specific configurations for certain file types. | ||
|
||
#### CSS, SCSS, HTML Files | ||
|
||
- `files` | ||
- `"**/*.css"` | ||
- `"**/*.scss"` | ||
- `"**/*.html"` | ||
- `options` | ||
- `singleQuote`: `false` (Overrides single quotes for these file types) | ||
|
Oops, something went wrong.