Skip to content

Commit

Permalink
Update ama rules to use one source of truth for internal package build (
Browse files Browse the repository at this point in the history
#291)

* move rules to root of package

* include rules in npm publish

* update to include accessibilityLabelExceptions

* Added patch changeset
  • Loading branch information
JDMathew authored Jan 7, 2025
1 parent daf88aa commit 460e339
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .changeset/few-geese-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@react-native-ama/internal': patch
---

- Added skeleton structure for the `ama.rules.json` file
- Moved ama.rules.json file to the root of internal package and included it in the package.json files to be published to npm.
4 changes: 4 additions & 0 deletions packages/internal/ama.rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rules": {},
"accessibilityLabelExceptions": []
}
1 change: 1 addition & 0 deletions packages/internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"files": [
"src",
"ama.rules.json",
"dist"
],
"scripts": {
Expand Down
3 changes: 0 additions & 3 deletions packages/internal/src/ama.rules.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/internal/src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
RULES_HELP,
} from './logger.rules';

const defaultRules: OverrideRule = require('./../ama.rules.json');
const defaultRules: OverrideRule = require('./../../ama.rules.json');
let projectRules = defaultRules;
try {
// look upwards to user's project root
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"include": ["src/**/*.ts", "src/ama.rules.json"],
"include": ["src/**/*.ts"],
"exclude": ["src/**/*.test.ts"],
"compilerOptions": {
"resolveJsonModule": true,
Expand Down

0 comments on commit 460e339

Please sign in to comment.