Skip to content

Commit

Permalink
Merge pull request #173 from CruGlobal/update-dependencies
Browse files Browse the repository at this point in the history
Update Dependencies - Boost Security and keep repo up to date
  • Loading branch information
dr-bizz authored Nov 21, 2024
2 parents 099262e + 4518aa8 commit b2ecd1c
Show file tree
Hide file tree
Showing 74 changed files with 1,371 additions and 1,255 deletions.
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

51 changes: 0 additions & 51 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/dist
/tmp
/out-tsc
.nx/

# dependencies
/node_modules
Expand Down
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint
yarn prettier:check
Binary file added .nx/cache/18.3.5-nx.darwin-arm64.node
Binary file not shown.
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "none"
}
4 changes: 0 additions & 4 deletions .prettierrc.js

This file was deleted.

8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"naumovs.color-highlight",
"streetsidesoftware.code-spell-checker"
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": ["javascript", "typescript", "html"],
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.nodePath": "node_modules",
"prettier.prettierPath": "./node_modules/prettier",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.bracketPairColorization.enabled": true
}
33 changes: 8 additions & 25 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/assets/img",
"src/assets/sitemap.txt"
],
"styles": [
"src/styles.css"
],
"assets": ["src/assets/img", "src/assets/sitemap.txt"],
"styles": ["src/styles.css"],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
Expand Down Expand Up @@ -105,27 +100,17 @@
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"karmaConfig": "src/karma.conf.cjs",
"styles": ["src/styles.css"],
"scripts": [],
"assets": [
"src/assets"
]
"assets": ["src/assets"]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
Expand Down Expand Up @@ -154,9 +139,7 @@
},
"defaultProject": "knowgod",
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
],
"schematicCollections": ["@angular-eslint/schematics"],
"analytics": false
}
}
121 changes: 121 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import angularEslintPlugin from '@angular-eslint/eslint-plugin';
import angularEslintTemplatePlugin from '@angular-eslint/eslint-plugin-template';
import * as path from 'path';
import eslintPluginImport from 'eslint-plugin-import';
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import eslintPluginPrettier from 'eslint-plugin-prettier';

export default [
{
ignores: ['dist/**']
},
{
files: ['**/*.ts'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: [path.resolve('tsconfig.json')],
createDefaultProgram: true
}
},
plugins: {
'@angular-eslint': angularEslintPlugin,
import: eslintPluginImport,
'@typescript-eslint': typescriptEslintPlugin,
prettier: eslintPluginPrettier
},
settings: {
'import/resolver': {
node: {
// Allows to import url starting from 'src'
paths: ['.'],
extensions: ['.js', '.ts', '.d.ts']
}
}
},

rules: {
...eslintPluginImport.configs.errors.rules,
...eslintPluginImport.configs.warnings.rules,
...eslintPluginImport.configs.typescript.rules,
...typescriptEslintPlugin.configs.recommended.rules,
...angularEslintPlugin.configs.recommended.rules,
'prettier/prettier': 'error',
'@angular-eslint/component-selector': [
'error',
{
prefix: 'app',
style: 'kebab-case',
type: 'element'
}
],
'@angular-eslint/directive-selector': [
'error',
{
prefix: 'app',
style: 'camelCase',
type: 'attribute'
}
],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
],
'import/no-duplicates': 'error',
'import/extensions': 'error',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
'object',
'type'
],
alphabetize: { order: 'asc' },
'newlines-between': 'never',
pathGroups: [
{
pattern: '{@angular,angular/**}',
group: 'external',
position: 'before'
},
{
pattern: '{src}/**',
group: 'parent',
position: 'before'
}
]
}
],
'import/newline-after-import': 'error',
'import/no-named-default': 'error',
'import/no-named-as-default-member': 'off',
'import/no-anonymous-default-export': 'error',
'import/no-useless-path-segments': 'error',
'import/dynamic-import-chunkname': 'error',
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
ignoreMemberSort: false
}
]
}
},
{
files: ['*.html'],
plugins: {
'@angular-eslint/template': angularEslintTemplatePlugin
},
rules: {
...angularEslintTemplatePlugin.configs.recommended.rules
}
}
];
49 changes: 23 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
"build": "ng build --configuration production",
"build:dev": "ng build --configuration development",
"test": "ng test --watch=false",
"lint": "npx eslint 'src/**/*.{js,ts}' --quiet --fix",
"lint": "eslint 'src/**/*.{js,ts,html}' --fix",
"prettier:check": "prettier '{{src,embed}/**/*.{js,json,ts,tsx,html},./*.{js,json,ts,tsx,yml,html}}' --list-different",
"prettier:write": "prettier '{{src,embed}/**/*.{js,json,ts,tsx,html},./*.{js,json,ts,tsx,yml,html}}' --write",
"precommit": "pretty-quick --staged"
"precommit": "pretty-quick --staged",
"postinstall": "husky install"
},
"type": "module",
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
Expand All @@ -23,40 +25,37 @@
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@cruglobal/godtools-shared": "1.0.1",
"@rails/actioncable": "^7.0.0",
"@cruglobal/godtools-shared": "~1.0.1",
"@rails/actioncable": "~8.0.0",
"core-js": "^3.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^5.0.0",
"lottie-web": "5.12.2",
"lottie-web": "^5.12.2",
"ngx-lottie": "^8.3.0",
"ngx-toastr": "^17.0.2",
"rxjs": "^6.6.7",
"rxjs": "7.8.1",
"ts-clipboard": "^1.0.17",
"tslib": "^2.6.2",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.11",
"@angular-eslint/builder": "16.1.0",
"@angular-eslint/eslint-plugin": "16.1.0",
"@angular-eslint/eslint-plugin-template": "16.1.0",
"@angular-eslint/schematics": "16.1.0",
"@angular-eslint/template-parser": "16.1.0",
"@angular-eslint/builder": "~17.3.0",
"@angular-eslint/eslint-plugin": "~17.3.0",
"@angular-eslint/eslint-plugin-template": "~17.3.0",
"@angular-eslint/schematics": "~17.3.0",
"@angular-eslint/template-parser": "~17.3.0",
"@angular-eslint/utils": "~17.3.0",
"@angular/cli": "^17.3.11",
"@angular/compiler-cli": "^17.3.12",
"@angular/language-service": "^17.3.12",
"@types/jasmine": "~3.10.0",
"@types/jasminewd2": "~2.0.8",
"@types/jasmine": "~5.1.4",
"@types/node": "^18.0.0",
"@types/text-encoding": "0.0.35",
"@types/xml2js": "^0.4.8",
"@typescript-eslint/eslint-plugin": "^8.12.2",
"@typescript-eslint/parser": "^8.12.2",
"eslint": "^8.33.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"eslint": "^9.15.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.0",
"jasmine-core": "~4.6.0",
"jasmine-core": "~5.4.0",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
Expand All @@ -65,8 +64,6 @@
"prettier": "^3.0.0",
"pretty-quick": "^3.1.0",
"stream": "^0.0.3",
"timers": "^0.1.1",
"ts-node": "~9.1.1",
"typescript": "^5.2.2"
"typescript": "^5.4.5"
}
}
Loading

0 comments on commit b2ecd1c

Please sign in to comment.