Skip to content

Commit

Permalink
chore: fix lint error in cx, i18n and nx-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
robertIsaac committed Dec 23, 2024
1 parent 776f39b commit acf53f5
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 234 deletions.
39 changes: 0 additions & 39 deletions libs/cx/.eslintrc.json

This file was deleted.

60 changes: 32 additions & 28 deletions libs/cx/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
const nx = require('@nx/eslint-plugin');
const baseConfig = require('../../eslint.config.js');
const overrides = require('../../eslint.overrides');

module.exports = [
...baseConfig,
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
{
files: ['**/*.ts'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
...baseConfig,
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
...overrides,
{
files: ['**/*.ts'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'fdx',
style: 'camelCase'
}
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'fdx',
style: 'kebab-case'
}
]
}
},
},
{
files: ['**/*.html'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.html'],
// Override or add rules here
rules: {
'@angular-eslint/template/elements-content': 'off'
}
}
];
33 changes: 0 additions & 33 deletions libs/datetime-adapter/.eslintrc.json

This file was deleted.

33 changes: 0 additions & 33 deletions libs/i18n/.eslintrc.json

This file was deleted.

56 changes: 28 additions & 28 deletions libs/i18n/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ const nx = require('@nx/eslint-plugin');
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
{
files: ['**/*.ts'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
...baseConfig,
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
{
files: ['**/*.ts'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'fd',
style: 'camelCase'
}
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'fd',
style: 'kebab-case'
}
]
}
},
},
{
files: ['**/*.html'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.html'],
// Override or add rules here
rules: {}
}
];
40 changes: 0 additions & 40 deletions libs/moment-adapter/.eslintrc.json

This file was deleted.

62 changes: 34 additions & 28 deletions libs/nx-plugin/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,39 @@ const nx = require('@nx/eslint-plugin');
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
{
files: ['**/*.ts'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
...baseConfig,
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase'
}
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case'
}
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-var-requires': 'off',
'grouped-accessor-pairs': 'off',
'@typescript-eslint/no-shadow': 'off',
'no-unused-vars': 'off',
'no-bitwise': 'off'
}
},
},
{
files: ['**/*.html'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.html'],
// Override or add rules here
rules: {}
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { DefaultThemeRenderContext, JSX, Reflection } from 'typedoc';
import { fixedMarkdown } from '../utils';

export function commentSummary(context: DefaultThemeRenderContext, props: Reflection) {
if (!props.comment?.summary.some((part) => part.text)) return;
if (!props.comment?.summary.some((part) => part.text)) {
return;
}

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { DefaultThemeRenderContext, JSX, Reflection, ReflectionKind } from 'type
import { camelToTitleCase, fixedMarkdown } from '../utils';

export function commentTags({ markdown }: DefaultThemeRenderContext, props: Reflection) {
if (!props.comment) return;
if (!props.comment) {
return;
}

const tags = props.kindOf(ReflectionKind.SomeSignature)
? props.comment.blockTags.filter((tag) => tag.tag !== '@returns')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { DeclarationHierarchy, DefaultThemeRenderContext, JSX } from 'typedoc';
import { hierarchyList } from '../utils';

export function hierarchy(context: DefaultThemeRenderContext, props: DeclarationHierarchy | undefined) {
if (!props) return;
if (!props) {
return;
}

return (
<section class="tsd-panel tsd-hierarchy">
Expand Down
Loading

0 comments on commit acf53f5

Please sign in to comment.