Skip to content

Commit 9008482

Browse files
author
Arnaud Crowther
committed
workspace: linting fixes
1 parent 0acac8a commit 9008482

File tree

5 files changed

+236
-4
lines changed

5 files changed

+236
-4
lines changed

apps/docs/src/app/components/nav/nav.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { ReactComponent as Title } from '../../../assets/title.svg';
55
import { ThemeSelector } from '../theme-selector/theme-selector';
66
import styles from './nav.module.scss';
77

8+
const SCROLL_OFFSET = 90;
9+
810
export const Nav = () => {
911
const [scrolledNav, toggleScrolledNav] = useState(false);
1012
const [expandNav, toggleExpandNav] = useState(false);
@@ -17,7 +19,7 @@ export const Nav = () => {
1719

1820
useEffect(() => {
1921
const onScroll = () => {
20-
toggleScrolledNav(window.scrollY > 90);
22+
toggleScrolledNav(window.scrollY > SCROLL_OFFSET);
2123
};
2224
window.addEventListener('scroll', onScroll, true);
2325
return () => window.removeEventListener('scroll', onScroll, true);

libs/angular/button/.eslintrc.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"error",
1515
{
1616
"type": "attribute",
17-
"prefix": "alpha-components",
17+
"prefix": "alpha",
1818
"style": "camelCase"
1919
}
2020
],
2121
"@angular-eslint/component-selector": [
2222
"error",
2323
{
2424
"type": "element",
25-
"prefix": "alpha-components",
25+
"prefix": "alpha",
2626
"style": "kebab-case"
2727
}
2828
]

libs/react/root/src/lib/react-root.spec.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe('Root', () => {
3030

3131
it('should use darkMode if matchMedia returns true for "prefers-colors-dark"', () => {
3232
const darkMode = true;
33+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3334
(global as any).matchMedia = jest.fn(() => ({
3435
matches: true,
3536
...matchMediaMock,
@@ -41,6 +42,7 @@ describe('Root', () => {
4142

4243
it('should not use darkMode if matchMedia returns false for "prefers-colors-dark"', () => {
4344
const darkMode = false;
45+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4446
(global as any).matchMedia = jest.fn(() => ({
4547
matches: false,
4648
...matchMediaMock,

package-lock.json

+223
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
"nx": "nx",
77
"start": "nx serve",
88
"build": "nx build",
9+
"build-docs": "npm run lint-all && npm run test-all && nx build docs",
910
"test": "nx test",
1011
"test-all": "nx run-many --all --target=test",
1112
"lint": "nx workspace-lint && nx lint",
13+
"lint-all": "nx run-many --all --target=lint",
1214
"e2e": "nx e2e",
1315
"affected:apps": "nx affected:apps",
1416
"affected:libs": "nx affected:libs",
@@ -32,7 +34,7 @@
3234
"pub-react": "npm publish ./publish/react --access public",
3335
"pub-angular": "npm publish ./publish/angular --access public",
3436
"pub-all": "npm run pub-core && npm run pub-react && npm run pub-angular",
35-
"pub": "npm run test-all && npm run build-all && npm run pre-publish && npm run pub-all"
37+
"pub": "npm run lint-all && npm run test-all && npm run build-all && npm run pre-publish && npm run pub-all"
3638
},
3739
"private": true,
3840
"dependencies": {
@@ -66,6 +68,9 @@
6668
},
6769
"devDependencies": {
6870
"@angular-devkit/build-angular": "~0.1100.1",
71+
"@angular-eslint/eslint-plugin": "^2.0.2",
72+
"@angular-eslint/eslint-plugin-template": "^2.0.2",
73+
"@angular-eslint/template-parser": "^2.0.2",
6974
"@angular/compiler-cli": "^11.0.0",
7075
"@angular/language-service": "^11.0.0",
7176
"@babel/core": "7.9.6",

0 commit comments

Comments
 (0)