Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Oct 20, 2018
1 parent 4a0f846 commit 9e7aaad
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 49 deletions.
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
docs/**
*.cjs.*
*.esm.*
dist/**
71 changes: 35 additions & 36 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
{
"env": {
"browser": true,
"jest": true,
"node": true,
"es6": true
"env": {
"browser": true,
"jest": true,
"node": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier",
"prettier/react"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier",
"prettier/react"
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"func-style": [
"error",
"declaration",
{
"allowArrowFunctions": false
}
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": ["react", "prettier"],
"rules": {
"func-style": [
"error",
"declaration",
{
"allowArrowFunctions": false
}
],
"linebreak-style": ["error", "unix"],
"no-console": ["off"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-var": ["error"],
"react/no-render-return-value": ["off"],
"react/prop-types": ["off"],
"sort-keys": ["error", "asc"],
"prettier/prettier": "error"
}
"linebreak-style": ["error", "unix"],
"no-console": ["off"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-var": ["error"],
"react/no-render-return-value": ["off"],
"react/prop-types": ["off"],
"sort-keys": ["error", "asc"]
}
}
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ const TABLE_ROW_SPLIT = / *\| */;
* |(?:.*?<.*?>.*?)* ignore stuff in angle brackets
*
*/
const TEXT_BOLD_R = /^([*_])\1((?:[^`~()\[\]<>]*?|(?:.*?([`~]).*?\3.*?)*|(?:.*?\([^)]*?\).*?)*|(?:.*?\[[^\]]*?\].*?)*|(?:.*?<.*?>.*?)*|[^\1]*?)\1?)\1{2}/;
const TEXT_EMPHASIZED_R = /^([*_])((?:[^`~()\[\]<>]*?|(?:.*?([`~]).*?\3.*?)*|(?:.*?\([^)]*?\).*?)*|(?:.*?\[[^\]]*?\].*?)*|(?:.*?<.*?>.*?)*|[^\1]*?))\1/;
const TEXT_BOLD_R = /^([*_])\1((?:[^`~()[\]<>]*?|(?:.*?([`~]).*?\3.*?)*|(?:.*?\([^)]*?\).*?)*|(?:.*?\[[^\]]*?\].*?)*|(?:.*?<.*?>.*?)*|[^\1]*?)\1?)\1{2}/;
const TEXT_EMPHASIZED_R = /^([*_])((?:[^`~()[\]<>]*?|(?:.*?([`~]).*?\3.*?)*|(?:.*?\([^)]*?\).*?)*|(?:.*?\[[^\]]*?\].*?)*|(?:.*?<.*?>.*?)*|[^\1]*?))\1/;
const TEXT_STRIKETHROUGHED_R = /^~~((?:.*?([`~]).*?\2.*?)*|(?:.*?<.*?>.*?)*|.+?)~~/;

const TEXT_ESCAPED_R = /^\\([^0-9A-Za-z\s])/;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"codecov": "^3.0.1",
"emotion": "^9.1.2",
"eslint": "^4.12.1",
"eslint-config-prettier": "^2.9.0",
"eslint-config-prettier": "^3.1.0",
"eslint-plugin-react": "^7.5.1",
"in-publish": "^2.0.0",
"jest": "^23.6.0",
Expand Down Expand Up @@ -70,7 +70,7 @@
},
"scripts": {
"prepublish": "in-publish && npm run build && npm run release || not-in-publish",
"lint": "eslint index.js site.js",
"lint": "eslint .",
"prebuild": "rimraf dist && mkdirp dist",
"build": "NODE_ENV=production babel index.js --out-file dist/cjs.js --source-maps && NODE_ENV=production BABEL_ENV=esm babel index.js --out-file dist/esm.js --source-maps",
"release": "webpack --config ./webpack.config.prod.babel.js -p --display-optimization-bailout",
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2818,11 +2818,11 @@ escodegen@^1.9.0:
optionalDependencies:
source-map "~0.6.1"

eslint-config-prettier@^2.9.0:
version "2.9.0"
resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz#5ecd65174d486c22dff389fe036febf502d468a3"
eslint-config-prettier@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-3.1.0.tgz#2c26d2cdcfa3a05f0642cd7e6e4ef3316cdabfa2"
dependencies:
get-stdin "^5.0.1"
get-stdin "^6.0.0"

eslint-plugin-react@^7.5.1:
version "7.7.0"
Expand Down Expand Up @@ -3401,9 +3401,9 @@ get-stdin@^4.0.1:
version "4.0.1"
resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"

get-stdin@^5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
get-stdin@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"

get-stream@3.0.0, get-stream@^3.0.0:
version "3.0.0"
Expand Down

0 comments on commit 9e7aaad

Please sign in to comment.