Skip to content

Commit a42ceb0

Browse files
committed
Upgrade lint packages
1 parent 950e00b commit a42ceb0

File tree

10 files changed

+124
-124
lines changed

10 files changed

+124
-124
lines changed

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"asyncArrow": "always",
1212
"named": "never"
1313
}],
14-
"jsx-quotes": ["error", "prefer-double"]
14+
"jsx-quotes": ["error", "prefer-double"],
15+
"react/jsx-fragments": "off"
1516
},
16-
"parser": "babel-eslint",
17+
"parser": "@babel/eslint-parser",
1718
"parserOptions": {
1819
"allowImportExportEverywhere": true
1920
}

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,26 @@
4646
},
4747
"devDependencies": {
4848
"@babel/core": "^7.0.0",
49+
"@babel/eslint-parser": "^7.12.1",
4950
"@babel/plugin-proposal-class-properties": "^7.0.0",
5051
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
5152
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
5253
"@babel/preset-env": "^7.0.0",
5354
"@babel/preset-react": "^7.0.0",
5455
"babel-core": "^7.0.0-bridge.0",
55-
"babel-eslint": "^9.0.0",
5656
"babel-jest": "^23.4.2",
5757
"babel-loader": "^8.0.0",
5858
"clean-webpack-plugin": "^0.1.17",
5959
"css-loader": "^0.28.7",
6060
"enzyme": "^3.3.0",
6161
"enzyme-adapter-react-16": "^1.1.1",
62-
"eslint": "^4.19.1",
63-
"eslint-config-standard": "^11.0.0",
64-
"eslint-config-standard-jsx": "^5.0.0",
65-
"eslint-plugin-import": "^2.12.0",
66-
"eslint-plugin-node": "^6.0.1",
67-
"eslint-plugin-promise": "^3.7.0",
68-
"eslint-plugin-react": "^7.8.2",
69-
"eslint-plugin-standard": "^3.1.0",
62+
"eslint": "^7.17.0",
63+
"eslint-config-standard": "^16.0.2",
64+
"eslint-config-standard-jsx": "^10.0.0",
65+
"eslint-plugin-import": "^2.22.1",
66+
"eslint-plugin-node": "^11.1.0",
67+
"eslint-plugin-promise": "^4.2.1",
68+
"eslint-plugin-react": "^7.22.0",
7069
"fetch-mock": "^6.0.0-beta.2",
7170
"file-loader": "^1.1.5",
7271
"glob": "^7.1.2",

src/actions/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const postSnippet = (snippet, onSuccess, onError = () => {}) => dispatch
5757
fetch(getApiUri('snippets'), {
5858
method: 'POST',
5959
headers: {
60-
'Accept': 'application/json',
60+
Accept: 'application/json',
6161
'Content-Type': 'application/json',
6262
},
6363
body: JSON.stringify(snippet),

src/components/ListBox.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'
22
import { Scrollbars } from 'react-custom-scrollbars'
33

44
const ListBox = (props) => {
5-
const [ selected, setSelected ] = useState(null)
5+
const [selected, setSelected] = useState(null)
66
const { items, className } = props
77

88
useEffect(() => {

src/components/Snippet.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { existingSnippetOptions } from '../entries/aceEditorOptions'
2020
import '../styles/Snippet.styl'
2121

2222
const Snippet = ({ snippet, fetchSnippet, match }) => {
23-
const [ isShowEmbed, setIsShowEmbed ] = useState(false)
23+
const [isShowEmbed, setIsShowEmbed] = useState(false)
2424
const embeddedRef = useRef()
2525

2626
useEffect(() => {

src/components/common/Title.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33
import '../../styles/common/Title.styl'
44

55
const Title = ({ title, additionalClass }) => (
6-
<div className={`title ${additionalClass}`}>{ title }</div>
6+
<div className={`title ${additionalClass}`}>{title}</div>
77
)
88

99
export default Title

src/entries/snippetValidation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const reasons = details => {
2727

2828
errors.push(messages.has(reason)
2929
? messages.get(reason)
30-
: messages.get('default')
30+
: messages.get('default'),
3131
)
3232
})
3333

src/hoc/withSearch.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { Fragment, useState, useCallback } from 'react'
33
import { regExpEscape } from '../misc/reqExp'
44

55
const withSearch = BaseComponent => (props) => {
6-
const [ searchQuery, setSearchQuery ] = useState(null)
6+
const [searchQuery, setSearchQuery] = useState(null)
77
const { items, onClick, className } = props
88

99
const onSearch = useCallback(e => {

tests/components/Sidebar.test.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ describe('Sidebar', () => {
1414

1515
it('should have correct routes on sidebar items', () => {
1616
const routes = {
17-
'0': '/',
18-
'1': '/recent',
19-
'2': '/about',
17+
0: '/',
18+
1: '/recent',
19+
2: '/about',
2020
}
2121
const wrapper = shallow(<Sidebar />)
2222

@@ -27,9 +27,9 @@ describe('Sidebar', () => {
2727

2828
it('should have correct icons on sidebar items', () => {
2929
const icons = {
30-
'0': 'icon-new',
31-
'1': 'icon-recent',
32-
'2': 'icon-about',
30+
0: 'icon-new',
31+
1: 'icon-recent',
32+
2: 'icon-about',
3333
}
3434
const wrapper = shallow(<Sidebar />)
3535

@@ -40,9 +40,9 @@ describe('Sidebar', () => {
4040

4141
it('should have correct titles on sidebar items', () => {
4242
const titles = {
43-
'0': 'New Snippet',
44-
'1': 'Recent Snippets',
45-
'2': 'About',
43+
0: 'New Snippet',
44+
1: 'Recent Snippets',
45+
2: 'About',
4646
}
4747
const wrapper = shallow(<Sidebar />)
4848

webpack.config.js

Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -11,103 +11,103 @@ module.exports = () => {
1111
const syntaxes = process.env.SYNTAXES
1212
? process.env.SYNTAXES.split(',').map(item => item.trim())
1313
: [
14-
'text',
15-
'c_cpp',
16-
'csharp',
17-
'golang',
18-
'java',
19-
'javascript',
20-
'php',
21-
'perl',
22-
'python',
23-
'ruby',
24-
'rust',
25-
'css',
26-
'html',
27-
'objectivec',
28-
'swift',
29-
'clojure',
30-
'lisp',
31-
'haskell',
32-
'scala',
33-
'scheme',
34-
'actionscript',
35-
'ada',
36-
'apache_conf',
37-
'asciidoc',
38-
'assembly_x86',
39-
'batchfile',
40-
'cobol',
41-
'coffee',
42-
'd',
43-
'dart',
44-
'diff',
45-
'dockerfile',
46-
'dot',
47-
'ejs',
48-
'elixir',
49-
'elm',
50-
'erlang',
51-
'fortran',
52-
'gitignore',
53-
'glsl',
54-
'gobstones',
55-
'graphqlschema',
56-
'groovy',
57-
'haml',
58-
'handlebars',
59-
'haxe',
60-
'hjson',
61-
'ini',
62-
'jade',
63-
'json',
64-
'jsp',
65-
'jsx',
66-
'julia',
67-
'kotlin',
68-
'latex',
69-
'less',
70-
'livescript',
71-
'lua',
72-
'makefile',
73-
'markdown',
74-
'matlab',
75-
'mel',
76-
'mysql',
77-
'nix',
78-
'nsis',
79-
'ocaml',
80-
'pascal',
81-
'pgsql',
82-
'powershell',
83-
'prolog',
84-
'protobuf',
85-
'r',
86-
'rdoc',
87-
'rst',
88-
'sass',
89-
'scad',
90-
'scss',
91-
'sh',
92-
'sjs',
93-
'smarty',
94-
'sql',
95-
'stylus',
96-
'svg',
97-
'tcl',
98-
'tex',
99-
'textile',
100-
'toml',
101-
'tsx',
102-
'twig',
103-
'typescript',
104-
'vala',
105-
'vbscript',
106-
'verilog',
107-
'vhdl',
108-
'xml',
109-
'yaml',
110-
'django']
14+
'text',
15+
'c_cpp',
16+
'csharp',
17+
'golang',
18+
'java',
19+
'javascript',
20+
'php',
21+
'perl',
22+
'python',
23+
'ruby',
24+
'rust',
25+
'css',
26+
'html',
27+
'objectivec',
28+
'swift',
29+
'clojure',
30+
'lisp',
31+
'haskell',
32+
'scala',
33+
'scheme',
34+
'actionscript',
35+
'ada',
36+
'apache_conf',
37+
'asciidoc',
38+
'assembly_x86',
39+
'batchfile',
40+
'cobol',
41+
'coffee',
42+
'd',
43+
'dart',
44+
'diff',
45+
'dockerfile',
46+
'dot',
47+
'ejs',
48+
'elixir',
49+
'elm',
50+
'erlang',
51+
'fortran',
52+
'gitignore',
53+
'glsl',
54+
'gobstones',
55+
'graphqlschema',
56+
'groovy',
57+
'haml',
58+
'handlebars',
59+
'haxe',
60+
'hjson',
61+
'ini',
62+
'jade',
63+
'json',
64+
'jsp',
65+
'jsx',
66+
'julia',
67+
'kotlin',
68+
'latex',
69+
'less',
70+
'livescript',
71+
'lua',
72+
'makefile',
73+
'markdown',
74+
'matlab',
75+
'mel',
76+
'mysql',
77+
'nix',
78+
'nsis',
79+
'ocaml',
80+
'pascal',
81+
'pgsql',
82+
'powershell',
83+
'prolog',
84+
'protobuf',
85+
'r',
86+
'rdoc',
87+
'rst',
88+
'sass',
89+
'scad',
90+
'scss',
91+
'sh',
92+
'sjs',
93+
'smarty',
94+
'sql',
95+
'stylus',
96+
'svg',
97+
'tcl',
98+
'tex',
99+
'textile',
100+
'toml',
101+
'tsx',
102+
'twig',
103+
'typescript',
104+
'vala',
105+
'vbscript',
106+
'verilog',
107+
'vhdl',
108+
'xml',
109+
'yaml',
110+
'django']
111111
const assetsPath = process.env.ASSETS_PATH == null
112112
? '/'
113113
: process.env.ASSETS_PATH
@@ -221,7 +221,7 @@ module.exports = () => {
221221
// https://webpack.js.org/api/module-methods/#import-<Paste>
222222
new webpack.IgnorePlugin(
223223
new RegExp(`/(?!(?:${syntaxes.join('|')}).js$).*js$`),
224-
/brace[\\/]mode/
224+
/brace[\\/]mode/,
225225
),
226226

227227
// Each time we change something, a new version of bundled assets is

0 commit comments

Comments
 (0)