Skip to content

Commit

Permalink
chore: migrate @fluentui/react-conformance-make-styles (#20758)
Browse files Browse the repository at this point in the history
* chore: migrate @fluentui/react-conformance-make-styles

* Change files

* update config

* applied suggestions from another PR
  • Loading branch information
layershifter authored Nov 25, 2021
1 parent 208e351 commit edbe781
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update tooling configs",
"packageName": "@fluentui/react-conformance-make-styles",
"email": "[email protected]",
"dependentChangeType": "none"
}
3 changes: 1 addition & 2 deletions packages/react-conformance-make-styles/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.cache/
.storybook/
.vscode/
bundle-size/
Expand Down Expand Up @@ -26,4 +25,4 @@ __tests__
.editorconfig
.eslint*
.git*
.prettierignore
.prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "./api-extractor.json",
"mainEntryPointFilePath": "<projectFolder>/dist/<unscopedPackageName>/src/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/packages/<unscopedPackageName>/src/index.d.ts"
}
3 changes: 2 additions & 1 deletion packages/react-conformance-make-styles/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.json',
tsConfig: '<rootDir>/tsconfig.spec.json',
diagnostics: false,
},
},
Expand All @@ -17,4 +17,5 @@ module.exports = {
},
coverageDirectory: './coverage',
setupFilesAfterEnv: ['./config/tests.js'],
snapshotSerializers: ['@fluentui/jest-serializer-make-styles'],
};
8 changes: 4 additions & 4 deletions packages/react-conformance-make-styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
"lint": "just-scripts lint",
"test": "jest",
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-conformance-make-styles/src && yarn docs",
"storybook": "start-storybook",
"start": "yarn storybook"
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-conformance-make-styles/src && yarn docs",
"type-check": "tsc -b tsconfig.json"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
"@fluentui/scripts": "^1.0.0",
"@fluentui/react-conformance": "*"
"@fluentui/react-conformance": "*",
"@fluentui/babel-make-styles": "9.0.0-beta.3"
},
"dependencies": {
"@fluentui/react-make-styles": "9.0.0-beta.4",
Expand Down
27 changes: 16 additions & 11 deletions packages/react-conformance-make-styles/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"lib": ["ES2020", "dom"],
"outDir": "dist",
"jsx": "react",
"declaration": true,
"experimentalDecorators": true,
"target": "ES2019",
"noEmit": true,
"isolatedModules": true,
"importHelpers": true,
"jsx": "react",
"noUnusedLocals": true,
"preserveConstEnums": true,
"types": ["jest", "custom-global", "inline-style-expand-shorthand", "node"]
}
"preserveConstEnums": true
},
"include": [],
"files": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
13 changes: 13 additions & 0 deletions packages/react-conformance-make-styles/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"lib": ["DOM", "ES2019"],
"outDir": "dist",
"declaration": true,
"types": ["static-assets", "environment", "jest", "inline-style-expand-shorthand"],
"module": "CommonJS"
},
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"],
"include": ["./src/**/*.ts", "./src/**/*.tsx"]
}
9 changes: 9 additions & 0 deletions packages/react-conformance-make-styles/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"outDir": "dist",
"types": ["jest", "node", "inline-style-expand-shorthand"]
},
"include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
}

0 comments on commit edbe781

Please sign in to comment.