Skip to content

Commit

Permalink
test(lint): Merge TS and JS linting ESLint configs
Browse files Browse the repository at this point in the history
  • Loading branch information
bengourley committed Nov 13, 2019
1 parent 7b17647 commit 6cddc13
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 28 deletions.
30 changes: 25 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
// eslint config for .js files
module.exports = {
extends: [
'standard'
],
plugins: [
'react'
],
rules: {
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error'
},
parser: '@typescript-eslint/parser',
parserOptions: {
jsx: true
}
jsx: true,
ecmaVersion: 2018
},
overrides: [
// linting for js files
{
files: ['**/*.js'],
extends: [
'standard'
]
},
// linting for ts files
{
files: ['**/*.ts'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
rules: {
'@typescript-eslint/no-explicit-any': 'off'
}
}
]
}
18 changes: 0 additions & 18 deletions .eslintrc.ts.js

This file was deleted.

2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.browser
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /app
COPY package*.json ./
RUN npm install

COPY babel.config.js lerna.json .eslintignore .eslintrc.js .eslintrc.ts.js ./
COPY babel.config.js lerna.json .eslintignore .eslintrc.js ./
ADD min_packages.tar .
COPY bin ./bin
RUN npx lerna bootstrap
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /app
COPY package*.json ./
RUN npm install

COPY babel.config.js lerna.json .eslintignore .eslintrc.js .eslintrc.ts.js ./
COPY babel.config.js lerna.json .eslintignore .eslintrc.js ./
ADD min_packages.tar .
COPY bin ./bin
RUN npx lerna bootstrap
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.expo-publisher
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR /app
COPY package*.json ./
RUN npm install

COPY babel.config.js lerna.json .eslintignore .eslintrc.js .eslintrc.ts.js ./
COPY babel.config.js lerna.json .eslintignore .eslintrc.js ./
COPY packages ./packages
COPY bin ./bin
RUN npx lerna bootstrap
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.node
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /app
COPY package*.json ./
RUN npm install

COPY babel.config.js lerna.json .eslintignore .eslintrc.js .eslintrc.ts.js ./
COPY babel.config.js lerna.json .eslintignore .eslintrc.js ./
ADD min_packages.tar .
COPY bin ./bin
RUN npx lerna bootstrap
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"scripts": {
"bootstrap": "lerna bootstrap",
"build": "lerna run build --scope '@bugsnag/node' --scope '@bugsnag/browser' --scope '@bugsnag/expo' && lerna run build --ignore '@bugsnag/node' --ignore '@bugsnag/browser' --ignore '@bugsnag/expo'",
"test:lint": "eslint . --report-unused-disable-directives && eslint --no-eslintrc -c .eslintrc.ts.js --ext .ts .",
"test:lint": "eslint . --report-unused-disable-directives",
"test:unit": "lerna run test --ignore '@bugsnag/browser' --ignore '@bugsnag/node'",
"test:types": "lerna run test:types",
"test:test-container-registry-login": "$(aws ecr get-login --profile=opensource --no-include-email)",
Expand Down

0 comments on commit 6cddc13

Please sign in to comment.