Skip to content

Commit 12d450d

Browse files
committed
better rule integration
1 parent 308eb5f commit 12d450d

File tree

8 files changed

+35
-13
lines changed

8 files changed

+35
-13
lines changed

.eslintrc.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
jest: true,
77
webextensions: true,
88
},
9-
extends: ['plugin:react/recommended'],
9+
extends: ['eslint:recommended', 'plugin:react/recommended', 'prettier'],
1010
parser: 'babel-eslint',
1111
parserOptions: {
1212
ecmaFeatures: {
@@ -16,7 +16,7 @@ module.exports = {
1616
},
1717
sourceType: 'module',
1818
},
19-
plugins: ['react', 'prettier'],
19+
plugins: ['jest', 'react', 'prettier'],
2020
rules: {
2121
'prettier/prettier': 'error',
2222
'react/prop-types': [0],
@@ -26,9 +26,9 @@ module.exports = {
2626
'no-unreachable': 'error',
2727
'no-unused-vars': [
2828
'error',
29-
{varsIgnorePattern: '^_', args: 'all', argsIgnorePattern: '^_'},
29+
{ varsIgnorePattern: '^_', args: 'all', argsIgnorePattern: '^_' },
3030
],
3131
'constructor-super': 'error',
3232
'valid-typeof': 'error',
3333
},
34-
};
34+
}

.stylelintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
23
plugins: ['stylelint-prettier'],
34
rules: {
45
'prettier/prettier': true,

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"babel-eslint": "^10.0.1",
3939
"babel-jest": "^23.6.0",
4040
"eslint": "^5.8.0",
41+
"eslint-config-prettier": "^3.1.0",
4142
"eslint-plugin-jest": "^21.27.1",
4243
"eslint-plugin-prettier": "^3.0.0",
4344
"eslint-plugin-react": "^7.11.1",
@@ -46,6 +47,8 @@
4647
"lerna": "^3.4.3",
4748
"prettier": "^1.14.3",
4849
"stylelint": "^9.7.1",
50+
"stylelint-config-prettier": "^4.0.0",
51+
"stylelint-config-standard": "^18.2.0",
4952
"stylelint-prettier": "^1.0.3",
5053
"web-ext": "^2.4.0"
5154
}

packages/browser-webdriver/src/shims/fs.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// under the License.
1717

1818
const fs = require('fs')
19-
fs.existsSync = file => {
20-
console.log('fs.existsSync: ' + file)
19+
fs.existsSync = _file => {
2120
return false
2221
}

packages/selenium-ide/src/neo/IO/SideeX/recorder.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ export default class BackgroundRecorder {
7979

8080
// TODO: rename method
8181
tabsOnActivatedHandler(activeInfo) {
82-
console.log('tabs.onActivated')
8382
this.lastActivatedTabId = activeInfo.tabId
8483
let testCase = getSelectedCase()
8584
if (!testCase) {
@@ -130,7 +129,6 @@ export default class BackgroundRecorder {
130129
}
131130

132131
windowsOnFocusChangedHandler(windowId) {
133-
console.log('windows.onFocusChanged')
134132
let testCase = getSelectedCase()
135133
if (!testCase) {
136134
return
@@ -206,7 +204,6 @@ export default class BackgroundRecorder {
206204

207205
tabsOnRemovedHandler(tabId, _removeInfo) {
208206
// eslint-disable-line no-unused-vars
209-
console.log('tabs.onRemoved')
210207
let testCase = getSelectedCase()
211208
if (!testCase) {
212209
return
@@ -254,7 +251,6 @@ export default class BackgroundRecorder {
254251
webNavigationOnCreatedNavigationTargetHandler(details) {
255252
// we can't necessarily know that this will indicate a tab being
256253
// activated, and we hope tabs.onActivated will get called for us
257-
console.log('webNavigation.OnCreatedNavigationTarget')
258254
let testCase = getSelectedCase()
259255
if (!testCase) return
260256
let testCaseId = testCase.id

packages/selenium-ide/src/plugin/manager.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ class PluginManager {
4646
return new Promise(res => {
4747
Promise.all(
4848
this.plugins.map(plugin =>
49-
this.emitConfiguration(plugin, project).catch(e => {
50-
console.log(e)
49+
this.emitConfiguration(plugin, project).catch(_e => {
5150
return ''
5251
})
5352
)

packages/selenium-side-runner/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function runJest(project) {
283283
const child = fork(require.resolve('./child'), args, opts)
284284

285285
child.on('exit', code => {
286-
console.log('')
286+
console.log('') // eslint-disable-line no-console
287287
if (!program.run) {
288288
rimraf.sync(projectPath)
289289
}

yarn.lock

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,6 +2699,13 @@ escope@^3.6.0:
26992699
esrecurse "^4.1.0"
27002700
estraverse "^4.1.1"
27012701

2702+
eslint-config-prettier@^3.1.0:
2703+
version "3.1.0"
2704+
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-3.1.0.tgz#2c26d2cdcfa3a05f0642cd7e6e4ef3316cdabfa2"
2705+
integrity sha512-QYGfmzuc4q4J6XIhlp8vRKdI/fI0tQfQPy1dME3UOLprE+v4ssH/3W9LM2Q7h5qBcy5m0ehCrBDU2YF8q6OY8w==
2706+
dependencies:
2707+
get-stdin "^6.0.0"
2708+
27022709
eslint-plugin-jest@^21.27.1:
27032710
version "21.27.1"
27042711
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.27.1.tgz#b64c2d6a7f0751cecc14580d7f4d9a5520424448"
@@ -7854,6 +7861,23 @@ style-search@^0.1.0:
78547861
version "0.1.0"
78557862
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
78567863

7864+
stylelint-config-prettier@^4.0.0:
7865+
version "4.0.0"
7866+
resolved "https://registry.yarnpkg.com/stylelint-config-prettier/-/stylelint-config-prettier-4.0.0.tgz#8c712977be13bd25191ab8b986b5c07a3342a5dc"
7867+
integrity sha512-cwh3QbBC2+3zBeMvuxFjT8XsbSdyoyELOY9BZqMuvphUKEQ+srkPWoN60FlvRwLB014TOke4Y12KvTtfKnaHhg==
7868+
7869+
stylelint-config-recommended@^2.1.0:
7870+
version "2.1.0"
7871+
resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-2.1.0.tgz#f526d5c771c6811186d9eaedbed02195fee30858"
7872+
integrity sha512-ajMbivOD7JxdsnlS5945KYhvt7L/HwN6YeYF2BH6kE4UCLJR0YvXMf+2j7nQpJyYLZx9uZzU5G1ZOSBiWAc6yA==
7873+
7874+
stylelint-config-standard@^18.2.0:
7875+
version "18.2.0"
7876+
resolved "https://registry.yarnpkg.com/stylelint-config-standard/-/stylelint-config-standard-18.2.0.tgz#6283149aba7f64f18731aef8f0abfb35cf619e06"
7877+
integrity sha512-07x0TaSIzvXlbOioUU4ORkCIM07kyIuojkbSVCyFWNVgXMXYHfhnQSCkqu+oHWJf3YADAnPGWzdJ53NxkoJ7RA==
7878+
dependencies:
7879+
stylelint-config-recommended "^2.1.0"
7880+
78577881
stylelint-prettier@^1.0.3:
78587882
version "1.0.3"
78597883
resolved "https://registry.yarnpkg.com/stylelint-prettier/-/stylelint-prettier-1.0.3.tgz#d7b1e8c331045dc1fd9d792dd8a1a5afc5304018"

0 commit comments

Comments
 (0)