Skip to content

Commit

Permalink
Update eslint and eslint settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fkling committed Jun 14, 2018
1 parent ea89f10 commit 24cf330
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 31 deletions.
35 changes: 18 additions & 17 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extends:
- plugin:import/warnings

parserOptions:
ecmaVersion: 6
ecmaVersion: 2018
sourceType: module
ecmaFeatures:
jsx: true
Expand All @@ -17,23 +17,24 @@ plugins:
- require-in-package

rules:
comma-dangle: [2, "always-multiline"]
new-cap: 0
no-path-concat: 0
no-undef: 2
no-underscore-dangle: 0
comma-dangle: ["error", "always-multiline"]
new-cap: "off"
no-path-concat: "off"
no-undef: "error"
no-underscore-dangle: "off"
no-unused-vars:
- 1
- varsIgnorePattern: '^_'
no-use-before-define: 0
quotes: [2, "single", "avoid-escape"]
strict: 0
import/no-unresolved: [2, {commonjs: true, amd: true}]
import/named: 2
import/default: 2
import/namespace: 2
import/export: 2
require-in-package/require-in-package: 2
- "warn"
- varsIgnorePattern: "^_"
argsIgnorePattern: "^_"
no-use-before-define: "off"
quotes: ["error", "single", "avoid-escape"]
strict: "off"
import/no-unresolved: ["error", {commonjs: true, amd: true}]
import/named: "error"
import/default: "error"
import/namespace: "error"
import/export: "error"
require-in-package/require-in-package: "error"

settings:
import/resolver: "webpack"
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"babel-plugin-transform-runtime": "^6.23.0",
"cross-env": "^5.0.0",
"css-loader": "^0.28.3",
"eslint": "^3.11.1",
"eslint": "^4.19.1",
"eslint-import-resolver-webpack": "^0.8.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-react": "^7.0.1",
Expand Down
2 changes: 1 addition & 1 deletion website/src/parsers/css/postcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ export default {
['parser', ['built-in', 'scss', 'less', 'safe-parser']],
],
};
}
},
};
1 change: 1 addition & 0 deletions website/src/parsers/glsl/codemirror-mode/glsl.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint no-useless-escape: off */
// source: https://github.com/tangrams/GLSL-live-editor/blob/master/src/codemirror/mode/webGL-clike.js

// CodeMirror, copyright (c) by Marijn Haverbeke and others
Expand Down
1 change: 0 additions & 1 deletion website/src/parsers/html/parse5.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import defaultParserInterface from '../utils/defaultParserInterface';
import pkg from 'parse5/package.json';
import SettingsRenderer from '../utils/SettingsRenderer';

const ID = 'parse5';

Expand Down
2 changes: 1 addition & 1 deletion website/src/storage/gist.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import api from './api';
import {getParserByID} from '../parsers';

function getIDAndRevisionFromHash() {
let match = global.location.hash.match(/^#\/gist\/([^\/]+)(?:\/([^\/]+))?/);
let match = global.location.hash.match(/^#\/gist\/([^/]+)(?:\/([^/]+))?/);
if (match) {
return {
id: match[1],
Expand Down
2 changes: 1 addition & 1 deletion website/src/storage/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import api from './api';
import {getTransformerByID, getParserByID} from '../parsers';

function getIDAndRevisionFromHash() {
let match = global.location.hash.match(/^#\/(?!gist\/)([^\/]+)(?:\/(latest|\d*))?/);
let match = global.location.hash.match(/^#\/(?!gist\/)([^/]+)(?:\/(latest|\d*))?/);
if (match) {
return {
id: match[1],
Expand Down
2 changes: 1 addition & 1 deletion website/src/utils/url.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import queryString from 'query-string';

const DATA_PATTERN = /^#(?:\/([^\/?]+)(?:\/(\d*))?\/?)?(?:\?(.+))?/;
const DATA_PATTERN = /^#(?:\/([^/?]+)(?:\/(\d*))?\/?)?(?:\?(.+))?/;


export function getDataFromURI() {
Expand Down
27 changes: 19 additions & 8 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,14 @@ acorn@^4.0.3:
version "4.0.13"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"

acorn@^5.0.0, acorn@^5.0.3, acorn@^5.2.1, acorn@^5.5.0:
acorn@^5.0.0, acorn@^5.0.3, acorn@^5.2.1:
version "5.5.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9"

acorn@^5.5.0:
version "5.6.2"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7"

ajv-keywords@^1.0.0:
version "1.5.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c"
Expand Down Expand Up @@ -1570,8 +1574,8 @@ browserslist@^3.2.6:
electron-to-chromium "^1.3.45"

buffer-from@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531"
version "1.1.0"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04"

buffer-xor@^1.0.3:
version "1.0.3"
Expand Down Expand Up @@ -2499,8 +2503,8 @@ es-to-primitive@^1.1.1:
is-symbol "^1.0.1"

es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14:
version "0.10.42"
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.42.tgz#8c07dd33af04d5dcd1310b5cef13bea63a89ba8d"
version "0.10.45"
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.45.tgz#0bfdf7b473da5919d5adf3bd25ceb754fccc3653"
dependencies:
es6-iterator "~2.0.3"
es6-symbol "~3.1.1"
Expand Down Expand Up @@ -2752,7 +2756,7 @@ eslint@^2.5.3:
text-table "~0.2.0"
user-home "^2.0.0"

eslint@^3.11.1, eslint@^3.16.1:
eslint@^3.16.1:
version "3.19.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc"
dependencies:
Expand Down Expand Up @@ -2792,7 +2796,7 @@ eslint@^3.11.1, eslint@^3.16.1:
text-table "~0.2.0"
user-home "^2.0.0"

eslint@^4.0.0:
eslint@^4.0.0, eslint@^4.19.1:
version "4.19.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300"
dependencies:
Expand Down Expand Up @@ -4124,13 +4128,20 @@ js-yaml@3.4.5:
argparse "^1.0.2"
esprima "^2.6.0"

js-yaml@^3.10.0, js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.5.2, js-yaml@^3.9.0, js-yaml@^3.9.1:
js-yaml@^3.10.0, js-yaml@^3.4.3, js-yaml@^3.5.2, js-yaml@^3.9.0, js-yaml@^3.9.1:
version "3.11.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"

js-yaml@^3.5.1:
version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"

js-yaml@~3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
Expand Down

0 comments on commit 24cf330

Please sign in to comment.