Skip to content

Commit

Permalink
Update ESLint config
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmeuli committed Jan 14, 2020
1 parent 594e269 commit 6d13be0
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 32 deletions.
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"@babel/preset-env": "^7.7.7",
"@babel/preset-react": "^7.7.4",
"@babel/preset-typescript": "^7.7.7",
"@samuelmeuli/eslint-config": "^5.0.2",
"@samuelmeuli/eslint-config": "^6.0.0",
"@samuelmeuli/prettier-config": "^1.0.0",
"@samuelmeuli/stylelint-config": "^3.0.0",
"@samuelmeuli/tsconfig": "^0.2.0",
Expand All @@ -106,11 +106,10 @@
"eslint": "6.8.0",
"eslint-config-airbnb": "18.0.1",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^1.7.0",
"eslint-plugin-simple-import-sort": "^5.0.0",
"file-loader": "^5.0.2",
"html-webpack-plugin": "^3.2.0",
"husky": "^3.0.9",
Expand Down Expand Up @@ -155,18 +154,14 @@
"eslintConfig": {
"root": true,
"extends": [
"@samuelmeuli/eslint-config/typescript-react"
"@samuelmeuli/eslint-config/typescript-react",
"plugin:import/electron"
],
"env": {
"browser": true,
"node": true,
"jest": true
},
"settings": {
"import/core-modules": [
"electron"
]
},
"rules": {
"import/no-extraneous-dependencies": [
"error",
Expand Down
1 change: 1 addition & 0 deletions src/main/i18n/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { app } from "electron";

import logger from "electron-log";

import { Translations } from "../../shared/types";
Expand Down
3 changes: 2 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { app, BrowserWindow } from "electron";
import path from "path";

import contextMenu from "electron-context-menu";
import electronDebug from "electron-debug";
import path from "path";

import { initLogger } from "../shared/logger";
import { initI18n } from "./i18n/i18n";
Expand Down
1 change: 1 addition & 0 deletions src/main/menu/template.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MenuItemConstructorOptions } from "electron";

import { is } from "electron-util";

import { translate } from "../i18n/i18n";
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { remote } from "electron";

import React, { Component, ReactNode } from "react";

import { toggleWindowSize } from "../electron/window";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { remote } from "electron";

import logger from "electron-log";
import React, { PureComponent, ReactNode } from "react";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { remote } from "electron";

import logger from "electron-log";
import { is } from "electron-util";
import React, { ChangeEvent, PureComponent, ReactNode } from "react";
Expand Down
1 change: 1 addition & 0 deletions src/renderer/electron/ipcRenderer/listeners.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ipcRenderer, remote } from "electron";

import { darkMode, is } from "electron-util";

import { openOverlay, setTheme } from "../../store/app/actionCreators";
Expand Down
1 change: 1 addition & 0 deletions src/renderer/files/fileAccess.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import crypto from "crypto";
import fs from "fs";

import mv from "move-file";

import { translations } from "../utils/i18n";
Expand Down
1 change: 1 addition & 0 deletions src/renderer/files/preferences/preferences.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { remote } from "electron";

import settings from "electron-settings";
import { JsonValue } from "type-fest";

Expand Down
1 change: 1 addition & 0 deletions src/renderer/store/export/actionCreators.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { remote } from "electron";

import logger from "electron-log";

import { convertToMiniDiaryJson } from "../../files/export/json";
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/utils/native-theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { darkMode, is } from "electron-util";
import { release } from "os";

import { darkMode, is } from "electron-util";
import { gte } from "semver";

// macOS supports dark mode since Mojave (10.14)
Expand Down
3 changes: 2 additions & 1 deletion webpack.base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import LicenseCheckerWebpackPlugin from "license-checker-webpack-plugin";
import path from "path";

import LicenseCheckerWebpackPlugin from "license-checker-webpack-plugin";
import { Configuration } from "webpack";

export default (_: any, argv: Record<string, string>): Configuration => {
Expand Down
96 changes: 76 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1156,10 +1156,10 @@
"@nodelib/fs.scandir" "2.1.3"
fastq "^1.6.0"

"@samuelmeuli/eslint-config@^5.0.2":
version "5.0.2"
resolved "https://registry.yarnpkg.com/@samuelmeuli/eslint-config/-/eslint-config-5.0.2.tgz#1dec95230459f65e30d3970d9c092a260ae6f4af"
integrity sha512-BWO3wo7jZVLrq/BDy3EE89+GrgV7ykeNmp2IqKkr5GTkuvQcAI0jrnDhJvEvWPU4LSWwVQnf29Ha/OeWB8R4ZA==
"@samuelmeuli/eslint-config@^6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@samuelmeuli/eslint-config/-/eslint-config-6.0.0.tgz#bae3356064c5d19c0201f4842af2b568940e9db4"
integrity sha512-CnICdJIFgfWv/p//jDXd7atart+2Ww7vSu+VX+73f65XEdoU9g2MSxom27uOg8cdL/CTrHXdUbcnW3Br7E2NGg==

"@samuelmeuli/prettier-config@^1.0.0":
version "1.0.0"
Expand Down Expand Up @@ -2217,6 +2217,14 @@ array-unique@^0.3.2:
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=

array.prototype.flat@^1.2.1:
version "1.2.3"
resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b"
integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==
dependencies:
define-properties "^1.1.3"
es-abstract "^1.17.0-next.1"

arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
Expand Down Expand Up @@ -4287,6 +4295,23 @@ es-abstract@^1.12.0, es-abstract@^1.15.0, es-abstract@^1.4.3, es-abstract@^1.5.1
string.prototype.trimleft "^2.1.0"
string.prototype.trimright "^2.1.0"

es-abstract@^1.17.0-next.1:
version "1.17.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.0.tgz#f42a517d0036a5591dbb2c463591dc8bb50309b1"
integrity sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==
dependencies:
es-to-primitive "^1.2.1"
function-bind "^1.1.1"
has "^1.0.3"
has-symbols "^1.0.1"
is-callable "^1.1.5"
is-regex "^1.0.5"
object-inspect "^1.7.0"
object-keys "^1.1.1"
object.assign "^4.1.0"
string.prototype.trimleft "^2.1.1"
string.prototype.trimright "^2.1.1"

es-to-primitive@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a"
Expand Down Expand Up @@ -4356,10 +4381,10 @@ eslint-import-resolver-node@^0.3.2:
debug "^2.6.9"
resolve "^1.5.0"

eslint-module-utils@^2.4.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz#cdf0b40d623032274ccd2abd7e64c4e524d6e19c"
integrity sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw==
eslint-module-utils@^2.4.1:
version "2.5.2"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz#7878f7504824e1b857dd2505b59a8e5eda26a708"
integrity sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==
dependencies:
debug "^2.6.9"
pkg-dir "^2.0.0"
Expand All @@ -4369,22 +4394,23 @@ eslint-plugin-eslint-plugin@^2.1.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz#a7a00f15a886957d855feacaafee264f039e62d5"
integrity sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==

eslint-plugin-import@^2.18.2:
version "2.18.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz#02f1180b90b077b33d447a17a2326ceb400aceb6"
integrity sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==
eslint-plugin-import@^2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz#d749a7263fb6c29980def8e960d380a6aa6aecaa"
integrity sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ==
dependencies:
array-includes "^3.0.3"
array.prototype.flat "^1.2.1"
contains-path "^0.1.0"
debug "^2.6.9"
doctrine "1.5.0"
eslint-import-resolver-node "^0.3.2"
eslint-module-utils "^2.4.0"
eslint-module-utils "^2.4.1"
has "^1.0.3"
minimatch "^3.0.4"
object.values "^1.1.0"
read-pkg-up "^2.0.0"
resolve "^1.11.0"
resolve "^1.12.0"

eslint-plugin-jsx-a11y@^6.2.3:
version "6.2.3"
Expand Down Expand Up @@ -4422,11 +4448,6 @@ eslint-plugin-react@^7.14.3:
prop-types "^15.7.2"
resolve "^1.13.1"

eslint-plugin-simple-import-sort@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-5.0.0.tgz#fd2abac52c0ae6050baf340c004b0b5d9aa76e8e"
integrity sha512-Zn6OppySnbwl/UonkzmMBbiFXZwe/tI9ZlSXwQek5h1FfPv3hcDTE3kG0SC70pBsKuVE8IMwZCMl0tKwcY89rw==

eslint-scope@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
Expand Down Expand Up @@ -5941,6 +5962,11 @@ is-callable@^1.1.4:
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==

is-callable@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab"
integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==

is-ci@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
Expand Down Expand Up @@ -6151,6 +6177,13 @@ is-regex@^1.0.4:
dependencies:
has "^1.0.1"

is-regex@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae"
integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==
dependencies:
has "^1.0.3"

is-regexp@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069"
Expand Down Expand Up @@ -9567,13 +9600,20 @@ [email protected]:
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=

resolve@^1.10.0, resolve@^1.11.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.5.0:
resolve@^1.10.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.5.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.13.1.tgz#be0aa4c06acd53083505abb35f4d66932ab35d16"
integrity sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==
dependencies:
path-parse "^1.0.6"

resolve@^1.12.0:
version "1.14.2"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.2.tgz#dbf31d0fa98b1f29aa5169783b9c290cb865fea2"
integrity sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==
dependencies:
path-parse "^1.0.6"

responselike@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
Expand Down Expand Up @@ -10374,6 +10414,14 @@ string.prototype.trimleft@^2.1.0:
define-properties "^1.1.3"
function-bind "^1.1.1"

string.prototype.trimleft@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74"
integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==
dependencies:
define-properties "^1.1.3"
function-bind "^1.1.1"

string.prototype.trimright@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz#669d164be9df9b6f7559fa8e89945b168a5a6c58"
Expand All @@ -10382,6 +10430,14 @@ string.prototype.trimright@^2.1.0:
define-properties "^1.1.3"
function-bind "^1.1.1"

string.prototype.trimright@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9"
integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==
dependencies:
define-properties "^1.1.3"
function-bind "^1.1.1"

string_decoder@^1.0.0, string_decoder@^1.1.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
Expand Down

0 comments on commit 6d13be0

Please sign in to comment.