Skip to content

Commit

Permalink
Merge pull request #1 from t-medina/feature/lint
Browse files Browse the repository at this point in the history
Feature/lint
  • Loading branch information
t-medina committed May 20, 2021
2 parents 9120795 + 2160956 commit 29cac5b
Show file tree
Hide file tree
Showing 10 changed files with 2,352 additions and 2,221 deletions.
47 changes: 47 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
"env": {
"browser": true,
"es2021": true,
"react-native/react-native": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-native/all"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react",
"react-native"
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
]
}
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
17 changes: 14 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
language: node_js
node_js:
- '15'
install: yarn install
script: yarn test
after_success: yarn coverage

jobs:
include:
- stage: "Linting and Unit Tests"
name: "Linting"
install:
- yarn install
script: yarn lint
- name: "Unit Tests"
install:
- yarn install
script: yarn test
after_success:
- yarn coverage
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Code-linting support with ESLint
- Linting job on CI configuration


## [1.0.1] - 2021-05-16
### Added
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
preset: 'react-native',
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|@react-native-community|@?expo|@unimodules)',
'node_modules/(?!(jest-)?react-native|@react-native-community|@?expo|@unimodules|@react-native)',
],
};
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
"description": "Bootstrap's flexbox grid system for React Native",
"main": "src/index.js",
"scripts": {
"lint": "eslint src/",
"test": "jest",
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls"
},
"files": [
"src/"
],
"repository": {
"type": "git",
"url": "git+https://github.com/t-medina/react-native-rgrid.git"
Expand Down Expand Up @@ -34,22 +38,25 @@
"dependencies": {
"@expo/match-media": "^0.1.0",
"eventemitter3": "^4.0.7",
"lodash.isequal": "^4.5.0",
"matchmediaquery": "^0.3.1",
"prop-types": "^15.6.0"
"matchmediaquery": "^0.3.1"
},
"devDependencies": {
"@babel/core": "^7.14.2",
"@babel/core": "^7.14.3",
"@babel/eslint-parser": "^7.14.3",
"@babel/runtime": "^7.14.0",
"@testing-library/react-native": "^7.2.0",
"@unimodules/core": "*",
"@unimodules/react-native-adapter": "*",
"babel-jest": "^26.6.3",
"coveralls": "^3.1.0",
"eslint": "^7.26.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-native": "^3.10.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.66.0",
"react": "^16.13.0",
"react-native": "^0.61.5",
"prop-types": "^15.6.0",
"react": ">=16.13.0",
"react-native": ">=0.50.0",
"react-test-renderer": "^17.0.2"
}
}
Loading

0 comments on commit 29cac5b

Please sign in to comment.