Skip to content

Commit

Permalink
$$$ update $$$
Browse files Browse the repository at this point in the history
  • Loading branch information
darekf77 committed Mar 7, 2025
1 parent a8f76b4 commit babb697
Show file tree
Hide file tree
Showing 16 changed files with 52,622 additions and 4,436 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ Thumbs.db
/webpack.backend-dist-build.js
/run.js
/run-org.js
/update-vscode-package-json.js
/eslint.config.js
/projects/tmp*
!tsconfig*
!webpack.*
Expand Down
8 changes: 5 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
"**/webpack.backend-dist-build.js": true,
"**/run.js": true,
"**/run-org.js": true,
"**/update-vscode-package-json.js": true,
"**/eslint.config.js": true,
"**/tsconfig.isomorphic.json.filetemplate": true,
"**/tsconfig.isomorphic-flat-dist.json.filetemplate": true,
"**/tsconfig.browser.json.filetemplate": true,
Expand All @@ -47,12 +45,16 @@
"**/.npmignore": true,
"**/.babelrc": true,
"**/.npmrc": true,
"**/.eslintrc.json": true,
"**/.prettierignore": true,
"**/.prettierrc": true,
"**/.editorconfig": true,
"**/devDependencies.json": true,
"**/package.json": true,
"**/logo.svg": true,
".firedev": true,
".taon": true,
".tnp": true,
"**/*.filetemplate": true,
"**/tsconfig.*": true,
"**/tslint.*": true,
Expand Down Expand Up @@ -161,7 +163,7 @@
"fileMatch": [
"/taon.jsonc"
],
"url": "./taon-config.schema.json"
"url": "./taon-config-standalone.schema.json"
}
]
}
179 changes: 179 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
// eslint.config.js
const angularEslintRecommended = require('@angular-eslint/eslint-plugin').configs.recommended;
const angularTemplateProcessInlineTemplates = require('@angular-eslint/eslint-plugin-template').configs['process-inline-templates'];
const prettierConfig = require('eslint-config-prettier');

// eslint.config.js
module.exports = [
{
ignores: ["projects/**/*"], // Optional: ignore specific folders
},
{
files: ["src/**/*.ts"], // Specify the source folder explicitly
languageOptions: {
parser: require("@typescript-eslint/parser"), // Correct parser import
parserOptions: {
project: ['tsconfig.json'],
createDefaultProgram: true,
},
},
plugins: {
"@typescript-eslint": require("@typescript-eslint/eslint-plugin"),
"import": require("eslint-plugin-import"),
"@angular-eslint": require("@angular-eslint/eslint-plugin"),
},
rules: {
...angularEslintRecommended.rules,
...angularTemplateProcessInlineTemplates.rules,
...prettierConfig.rules,
'@angular-eslint/component-class-suffix': [
'warn',
{
suffixes: ['Page', 'Component','Container'],
},
],
// '@angular-eslint/component-selector': [
// 'warn',
// {
// type: 'element',
// prefix: 'app',
// style: 'kebab-case',
// },
// ],
// '@angular-eslint/directive-selector': [
// 'warn',
// {
// type: 'attribute',
// prefix: 'app',
// style: 'camelCase',
// },
// ],
// TO EXPENSIVE
// '@typescript-eslint/member-ordering': [
// 'warn',
// {
// default: [
// 'signature',
// 'call-signature',

// 'public-static-field',
// 'protected-static-field',
// 'private-static-field',
// '#private-static-field',

// 'public-decorated-field',
// 'protected-decorated-field',
// 'private-decorated-field',

// 'public-instance-field',
// 'protected-instance-field',
// 'private-instance-field',
// '#private-instance-field',

// 'public-abstract-field',
// 'protected-abstract-field',

// 'public-field',
// 'protected-field',
// 'private-field',
// '#private-field',

// 'static-field',
// 'instance-field',
// 'abstract-field',

// 'decorated-field',

// 'field',

// 'static-initialization',

// 'public-constructor',
// 'protected-constructor',
// 'private-constructor',

// 'constructor',
// 'public-static-method',
// 'protected-static-method',
// 'private-static-method',
// '#private-static-method',

// 'public-decorated-method',
// 'protected-decorated-method',
// 'private-decorated-method',

// 'public-instance-method',
// 'protected-instance-method',
// 'private-instance-method',
// '#private-instance-method',

// 'public-abstract-method',
// 'protected-abstract-method',

// 'public-method',
// 'protected-method',
// 'private-method',
// '#private-method',

// 'static-method',
// 'instance-method',
// 'abstract-method',

// 'decorated-method',

// 'method',
// ],
// },
// ],
// '@typescript-eslint/explicit-function-return-type': 0,
// 'no-void': 'error',
"no-unused-vars": "warn",
"import/order": [
"warn",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
'@typescript-eslint/explicit-function-return-type': [
'warn',
{
allowExpressions: true, // Allow function expressions (like anonymous functions) without return type
allowTypedFunctionExpressions: true, // Allow functions in type declarations (like in interfaces)
allowDirectConstAssertionInArrowFunctions: true, // Allow direct assertions
allowHigherOrderFunctions: true, // Allow higher-order functions without explicit return type
allowedNames: [], // List of getter names that are allowed to not have a return type
// enforceForGetters: true, // Enforce return type for getters
// enforceForSetters: false, // No need to enforce return type for setters (setters don't have return types)
},
],
// '@typescript-eslint/typedef': [
// 'warn',
// {
// memberVariableDeclaration: true,
// parameter: true,
// propertyDeclaration: true,
// },
// ],
},
},
// NOTE: WE ARE NOT APPLYING PRETTIER IN THIS OVERRIDE, ONLY @ANGULAR-ESLINT/TEMPLATE
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {},
},
// NOTE: WE ARE NOT APPLYING @ANGULAR-ESLINT/TEMPLATE IN THIS OVERRIDE, ONLY PRETTIER
{
files: ['*.html'],
excludedFiles: ['*inline-template-*.component.html'],
extends: ['plugin:prettier/recommended'],
rules: {
// NOTE: WE ARE OVERRIDING THE DEFAULT CONFIG TO ALWAYS SET THE PARSER TO ANGULAR (SEE BELOW)
'prettier/prettier': ['error', { parser: 'angular' }],
},
},
];
8 changes: 7 additions & 1 deletion projects/container-v18/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
"/docs-config.jsonc"
],
"url": "./docs-config.schema.json"
},
{
"fileMatch": [
"/taon.jsonc"
],
"url": "./taon-config-container.schema.json"
}
]
}
}
22 changes: 20 additions & 2 deletions projects/container-v18/isomorphic-lib-v18/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,77 @@
{
"files.exclude": {},

"workbench.colorCustomizations": {
"activityBar.background": "#0084ff",
"activityBar.foreground": "#000000"
},

"editor.rulers": [
80,
120
],

"html.format.wrapAttributes": "force-aligned",
"workbench.colorTheme": "Default Light+",
"tslint.autoFixOnSave": true,
"eslint.enable": true,
"tslint.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",

"search.exclude": {
"docs": true,
"projects": true,
"bin": true
},

"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false
},

"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false
},

"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false
},

"[json5]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false
},

"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false
},

"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false
},

"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false
},

"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": false
},

"eslint.migration.2_x": "off",
"prettier.enable": true,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.inlineSuggest.enabled": true,
"prettier.endOfLine": "auto"
}
"prettier.endOfLine": "auto",

"json.schemas": [{
"fileMatch": ["/taon.jsonc"],
"url": "./taon-config-standalone.schema.json"
}]
}
20 changes: 10 additions & 10 deletions projects/container-v18/isomorphic-lib-v18/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ module.exports = [
// 'no-void': 'error',
// "no-unused-vars": "warn",
// TODO modify in future for TAON use case
// "import/order": [
// "warn",
// {
// "newlines-between": "always",
// "alphabetize": {
// "order": "asc",
// "caseInsensitive": true
// }
// }
// ],
"import/order": [
"warn",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
'@typescript-eslint/explicit-function-return-type': [
'warn',
{
Expand Down
Loading

0 comments on commit babb697

Please sign in to comment.