Skip to content

Commit 460e339

Browse files
authored
Update ama rules to use one source of truth for internal package build (#291)
* move rules to root of package * include rules in npm publish * update to include accessibilityLabelExceptions * Added patch changeset
1 parent daf88aa commit 460e339

6 files changed

Lines changed: 13 additions & 5 deletions

File tree

.changeset/few-geese-divide.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@react-native-ama/internal': patch
3+
---
4+
5+
- Added skeleton structure for the `ama.rules.json` file
6+
- Moved ama.rules.json file to the root of internal package and included it in the package.json files to be published to npm.

packages/internal/ama.rules.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"rules": {},
3+
"accessibilityLabelExceptions": []
4+
}

packages/internal/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
"files": [
1717
"src",
18+
"ama.rules.json",
1819
"dist"
1920
],
2021
"scripts": {

packages/internal/src/ama.rules.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/internal/src/utils/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
RULES_HELP,
1212
} from './logger.rules';
1313

14-
const defaultRules: OverrideRule = require('./../ama.rules.json');
14+
const defaultRules: OverrideRule = require('./../../ama.rules.json');
1515
let projectRules = defaultRules;
1616
try {
1717
// look upwards to user's project root

packages/internal/tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"include": ["src/**/*.ts", "src/ama.rules.json"],
2+
"include": ["src/**/*.ts"],
33
"exclude": ["src/**/*.test.ts"],
44
"compilerOptions": {
55
"resolveJsonModule": true,

0 commit comments

Comments
 (0)