Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Add eslint rules. #15

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
name: CI Checks

on: [push, pull_request]
on:
push:
paths:
- "expo-boomboomapp/**"
- .github/workflows/checks.yml
pull_request:

defaults:
run:
working-directory: expo-boomboomapp

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: '21'
node-version: 21
cache: npm
cache-dependency-path: "expo-boomboomapp/package-lock.json"

- name: Install Dependencies
run: |
cd expo-boomboomapp
npm install
run: npm install

- name: Run Lint
run: |
cd expo-boomboomapp
npm run lint
run: npm run lint

- name: Check Formatting
run: |
cd expo-boomboomapp
npm run format-check
run: npm run format-check

- name: Check Ts
run: |
cd expo-boomboomapp
npm run ts-check
run: npm run ts-check
52 changes: 51 additions & 1 deletion expo-boomboomapp/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
module.exports = {
root: true,
extends: ["universe/native"],
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"universe/native",
"@react-native",
"plugin:jest/recommended",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:react-hooks/recommended",
"prettier",
],
overrides: [],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: [
"react",
"@typescript-eslint",
"import",
"react-hooks",
"react-native",
"unused-imports",
],
rules: {
"no-redeclare": "error",
"react/prop-types": "off",
"react/jsx-boolean-value": "error",
"react/react-in-jsx-scope": "off",
"react-native/no-unused-styles": "error",
"react-native/no-color-literals": "warn",
"react-native/no-inline-styles": "off", // TODO: Turn on an fix this errors
"react/no-unescaped-entities": [
"error",
{
forbid: [
{
char: ">",
alternatives: [">"],
},
],
},
],
"unused-imports/no-unused-imports": "error",
},
};
1 change: 1 addition & 0 deletions expo-boomboomapp/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading
Loading