Skip to content

Commit

Permalink
fix: setup lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Naturalclar committed Apr 17, 2024
1 parent 766cf4f commit d22e016
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install Dependencies
run: yarn
- name: ESLint Checks
run: yarn validate:eslint
run: yarn lint
flow:
runs-on: ubuntu-latest
strategy:
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install Dependencies
run: yarn
- name: Flow Checks
run: yarn validate:flow
run: yarn flow
tsc:
runs-on: ubuntu-latest
strategy:
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Install Dependencies
run: yarn
- name: TypeScript type check
run: yarn validate:typescript
run: yarn typecheck
android:
runs-on: ubuntu-latest
strategy:
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"author": "Jesse Katsumata <[email protected]> (Naturalclar)",
"description": "React Native Picker for iOS, Android, macOS, and Windows",
"scripts": {
"lint": "turbo lint"
"lint": "turbo lint",
"flow": "turbo flow",
"typecheck":"turbo typecheck"
},
"devDependencies": {
"@react-native/eslint-config": "^0.72.2",
Expand Down
7 changes: 7 additions & 0 deletions packages/example/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"jsxBracketSameLine": true,
"parser": "flow"
}
2 changes: 1 addition & 1 deletion packages/example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
} from 'react-native/Libraries/NewAppScreen';

type SectionProps = PropsWithChildren<{
title: string;
title: string,
}>;

function Section({children, title}: SectionProps): React.JSX.Element {
Expand Down
2 changes: 1 addition & 1 deletion packages/example/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { makeMetroConfig } = require("@rnx-kit/metro-config");
const {makeMetroConfig} = require('@rnx-kit/metro-config');
module.exports = makeMetroConfig({
transformer: {
getTransformOptions: async () => ({
Expand Down
12 changes: 6 additions & 6 deletions packages/example/react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
const project = (() => {
try {
const { configureProjects } = require("react-native-test-app");
const {configureProjects} = require('react-native-test-app');
return configureProjects({
android: {
sourceDir: "android",
sourceDir: 'android',
},
ios: {
sourceDir: "ios",
sourceDir: 'ios',
},
windows: {
sourceDir: "windows",
solutionFile: "windows/Example.sln",
sourceDir: 'windows',
solutionFile: 'windows/Example.sln',
},
});
} catch (_) {
Expand All @@ -19,5 +19,5 @@ const project = (() => {
})();

module.exports = {
...(project ? { project } : undefined),
...(project ? {project} : undefined),
};
3 changes: 3 additions & 0 deletions packages/picker/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
};
3 changes: 0 additions & 3 deletions packages/picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
"babel-jest": "^26.6.3",
"babel-plugin-module-resolver": "^3.2.0",
"detox": "^17.10.6",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"expo": "^41.0.1",
"flow-bin": "0.222.0",
"husky": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8667,7 +8667,7 @@ eslint-plugin-jest@^26.5.3:
dependencies:
"@typescript-eslint/utils" "^5.10.0"

eslint-plugin-prettier@^4.0.0, eslint-plugin-prettier@^4.2.1:
eslint-plugin-prettier@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
Expand Down

0 comments on commit d22e016

Please sign in to comment.