Skip to content

Commit

Permalink
chore: enable "lint" in CI checks (#14)
Browse files Browse the repository at this point in the history
* chore: enable "lint" in CI checks

* Change files
  • Loading branch information
layershifter authored Jan 20, 2022
1 parent a0ce0dc commit 0a94e83
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"excludedFiles": "*.fixture.js",
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ jobs:
yarn-cache-folder-
- run: yarn install --frozen-lockfile
- run: yarn nx affected --target=lint --parallel --max-parallel=3
- run: yarn nx affected --target=build --parallel --max-parallel=3
- run: yarn nx affected --target=test --parallel --max-parallel=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "fix lint issues",
"packageName": "@griffel/react",
"email": "olfedias@microsoft.com",
"dependentChangeType": "none"
}
9 changes: 1 addition & 8 deletions packages/react/src/RendererContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ export interface RendererProviderProps {
* Verifies if an application can use DOM.
*/
function canUseDOM(): boolean {
return (
typeof window !== 'undefined' &&
!!(
window.document &&
// eslint-disable-next-line deprecation/deprecation
window.document.createElement
)
);
return typeof window !== 'undefined' && !!(window.document && window.document.createElement);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/makeStaticStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { makeStaticStyles as vanillaMakeStaticStyles } from '@griffel/core';
import { useRenderer } from './RendererContext';
import type { GriffelStaticStyles, MakeStaticStylesOptions } from '@griffel/core';

export function makeStaticStyles<Selectors>(styles: GriffelStaticStyles | GriffelStaticStyles[]) {
export function makeStaticStyles(styles: GriffelStaticStyles | GriffelStaticStyles[]) {
const getStyles = vanillaMakeStaticStyles(styles);

if (process.env.NODE_ENV === 'test') {
Expand Down

0 comments on commit 0a94e83

Please sign in to comment.