Skip to content

Commit

Permalink
update rule and add eslint config package
Browse files Browse the repository at this point in the history
  • Loading branch information
Borys91 committed Feb 1, 2024
1 parent 0d84ef7 commit 773aaa7
Show file tree
Hide file tree
Showing 8 changed files with 215 additions and 77 deletions.
34 changes: 17 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'angular',
'prettier'
],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:angular/recommended',
'prettier',
'prettier/@typescript-eslint',
'prettier/angular'
],
rules: {
'prettier/prettier': 'error'
}
};
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'angular',
'prettier'
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:prettier/recommended"
],
rules: {
'prettier/prettier': 'error',
},
};
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/*.csproj') }}
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Run './build.cmd Publish'
run: ./build.cmd Publish
env:
Expand Down
26 changes: 4 additions & 22 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
"enum": ["Debug", "Release"]
},
"Continue": {
"type": "boolean",
Expand Down Expand Up @@ -71,36 +68,21 @@
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"BuildLibrary",
"Publish",
"Restore",
"TestLibrary"
]
"enum": ["BuildLibrary", "Publish", "Restore", "TestLibrary"]
}
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"BuildLibrary",
"Publish",
"Restore",
"TestLibrary"
]
"enum": ["BuildLibrary", "Publish", "Restore", "TestLibrary"]
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
"enum": ["Minimal", "Normal", "Quiet", "Verbose"]
}
}
}
Expand Down
68 changes: 35 additions & 33 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
{
"overrides": [
{
"files": ["*.ts", "*spec.ts"],
"options": {
"trailingComma": "none",
"printWidth": 140,
"endOfLine": "auto",
"importOrder": [
"^@angular/",
"^@dangl/*",
"^rxjs/*",
"<THIRD_PARTY_MODULES>",
"^app/",
"^\\.\\.\\/\\.\\.\\/.*",
"^\\.\\/.*",
".*"
],
"importOrderSeparation": true,
"parser": "typescript",
"importOrderParserPlugins": ["typescript", "decorators-legacy"],
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
},
{
"files": ["*.html"],
"options": {
"tabWidth": 2,
"printWidth": 140,
"endOfLine": "auto"
}
}
]
}
"overrides": [
{
"files": ["*.ts", "*spec.ts"],
"options": {
"singleQuote": true,
"trailingComma": "none",
"printWidth": 140,
"endOfLine": "auto",
"importOrder": [
"^@angular/",
"^@dangl/*",
"^rxjs/*",
"<THIRD_PARTY_MODULES>",
"^app/",
"^\\.\\.\\/\\.\\.\\/.*",
"^\\.\\/.*",
".*"
],
"importOrderSeparation": true,
"parser": "typescript",
"importOrderParserPlugins": ["typescript", "decorators-legacy"],
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
},
{
"files": ["*.html"],
"options": {
"singleQuote": true,
"tabWidth": 2,
"printWidth": 140,
"endOfLine": "auto"
}
}
]
}
Binary file modified README.md
Binary file not shown.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./.prettierrc');
module.exports = require('./.prettierrc');
155 changes: 153 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
"homepage": "https://github.com/Dangl-IT/prettier-config-dangl",
"devDependencies": {
"@angular-eslint/eslint-plugin": "^17.2.1",
"@angular-eslint/eslint-plugin-template": "^17.2.1",
"@angular-eslint/template-parser": "^17.2.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-angular": "^4.1.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.4"
}
Expand Down

0 comments on commit 773aaa7

Please sign in to comment.