Merge pull request #883 from yuya-oc/eslint-plugin-eslint-comments
Add eslint-plugin-eslint-comments
This commit is contained in:
commit
6e2b3d7fab
|
@ -1,5 +1,8 @@
|
||||||
{
|
{
|
||||||
"extends": "./.eslintrc-webapp.json",
|
"extends": [
|
||||||
|
"./.eslintrc-webapp.json",
|
||||||
|
"plugin:eslint-comments/recommended"
|
||||||
|
],
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2017
|
"ecmaVersion": 2017
|
||||||
},
|
},
|
||||||
|
@ -7,6 +10,7 @@
|
||||||
"import/resolver": "node"
|
"import/resolver": "node"
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"eslint-comments/no-unused-disable": "error",
|
||||||
"header/header": [2, "line", [
|
"header/header": [2, "line", [
|
||||||
" Copyright (c) 2015-2016 Yuya Ochiai",
|
" Copyright (c) 2015-2016 Yuya Ochiai",
|
||||||
" Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.",
|
" Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.",
|
||||||
|
|
18
package-lock.json
generated
18
package-lock.json
generated
|
@ -4898,6 +4898,24 @@
|
||||||
"globals": "^11.0.1"
|
"globals": "^11.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"eslint-plugin-eslint-comments": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-GZDKhOFqJLKlaABX+kdoLskcTINMrVOWxGca54KcFb1QCPd0CLmqgAMRxkkUfGSmN+5NJUMGh7NGccIMcWPSfQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"ignore": "^5.0.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ignore": {
|
||||||
|
"version": "5.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.0.5.tgz",
|
||||||
|
"integrity": "sha512-kOC8IUb8HSDMVcYrDVezCxpJkzSQWTAzf3olpKM6o9rM5zpojx23O0Fl8Wr4+qJ6ZbPEHqf1fdwev/DS7v7pmA==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"eslint-plugin-header": {
|
"eslint-plugin-header": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-2.0.0.tgz",
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
"eslint": "^5.9.0",
|
"eslint": "^5.9.0",
|
||||||
"eslint-config-mattermost": "github:mattermost/eslint-config-mattermost",
|
"eslint-config-mattermost": "github:mattermost/eslint-config-mattermost",
|
||||||
"eslint-plugin-cypress": "^2.1.2",
|
"eslint-plugin-cypress": "^2.1.2",
|
||||||
|
"eslint-plugin-eslint-comments": "^3.1.1",
|
||||||
"eslint-plugin-header": "^2.0.0",
|
"eslint-plugin-header": "^2.0.0",
|
||||||
"eslint-plugin-import": "^2.14.0",
|
"eslint-plugin-import": "^2.14.0",
|
||||||
"eslint-plugin-react": "^7.11.1",
|
"eslint-plugin-react": "^7.11.1",
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
// This file uses process.exit().
|
||||||
/* eslint-disable no-process-exit */
|
/* eslint-disable no-process-exit */
|
||||||
|
|
||||||
const {spawn} = require('child_process');
|
const {spawn} = require('child_process');
|
||||||
|
@ -19,3 +20,5 @@ spawn(path7za, ['e', '-y', '*.zip'], {
|
||||||
}).on('close', (code) => {
|
}).on('close', (code) => {
|
||||||
process.exit(code);
|
process.exit(code);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* eslint-enable no-process-exit */
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
// This files uses setState().
|
||||||
/* eslint-disable react/no-set-state */
|
/* eslint-disable react/no-set-state */
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
|
@ -459,3 +460,5 @@ MainPage.propTypes = {
|
||||||
requestingPermission: TabBar.propTypes.requestingPermission,
|
requestingPermission: TabBar.propTypes.requestingPermission,
|
||||||
onClickPermissionDialog: PropTypes.func,
|
onClickPermissionDialog: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-enable react/no-set-state */
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
// This file uses setState().
|
||||||
/* eslint-disable react/no-set-state */
|
/* eslint-disable react/no-set-state */
|
||||||
// setState() is necessary for this component
|
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
|
|
||||||
|
@ -303,3 +303,5 @@ MattermostView.propTypes = {
|
||||||
useSpellChecker: PropTypes.bool,
|
useSpellChecker: PropTypes.bool,
|
||||||
onSelectSpellCheckerLocale: PropTypes.func,
|
onSelectSpellCheckerLocale: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-enable react/no-set-state */
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
// This file uses setState().
|
||||||
/* eslint-disable react/no-set-state */
|
/* eslint-disable react/no-set-state */
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -628,3 +629,5 @@ SettingsPage.propTypes = {
|
||||||
configFile: PropTypes.string,
|
configFile: PropTypes.string,
|
||||||
enableServerManagement: PropTypes.bool,
|
enableServerManagement: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-enable react/no-set-state */
|
||||||
|
|
|
@ -284,7 +284,7 @@ function handleScreenResize(screen, browserWindow) {
|
||||||
|
|
||||||
app.on('browser-window-created', (e, newWindow) => {
|
app.on('browser-window-created', (e, newWindow) => {
|
||||||
// Screen cannot be required before app is ready
|
// Screen cannot be required before app is ready
|
||||||
const {screen} = electron; // eslint-disable-line global-require
|
const {screen} = electron;
|
||||||
handleScreenResize(screen, newWindow);
|
handleScreenResize(screen, newWindow);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ describe('common/settings.js', () => {
|
||||||
describe('common/config/', () => {
|
describe('common/config/', () => {
|
||||||
it('pastDefaultPreferences should have each past version of defaultPreferences', () => {
|
it('pastDefaultPreferences should have each past version of defaultPreferences', () => {
|
||||||
for (let version = 0; version <= defaultPreferences.version; version++) {
|
for (let version = 0; version <= defaultPreferences.version; version++) {
|
||||||
pastDefaultPreferences[`${version}`].should.exist; // eslint-disable-line no-unused-expressions
|
pastDefaultPreferences[`${version}`].should.exist;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
// This file uses CommonJS.
|
||||||
/* eslint-disable import/no-commonjs */
|
/* eslint-disable import/no-commonjs */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -19,3 +20,5 @@ module.exports = {
|
||||||
] : [],
|
] : [],
|
||||||
devtool: isProduction ? false : '#inline-source-map',
|
devtool: isProduction ? false : '#inline-source-map',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* eslint-enable import/no-commonjs */
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
// This files uses CommonJS.
|
||||||
/* eslint-disable import/no-commonjs */
|
/* eslint-disable import/no-commonjs */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -23,3 +24,5 @@ module.exports = merge(base, {
|
||||||
},
|
},
|
||||||
target: 'electron-main',
|
target: 'electron-main',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* eslint-enable import/no-commonjs */
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
|
// This file uses CommonJS.
|
||||||
/* eslint-disable import/no-commonjs */
|
/* eslint-disable import/no-commonjs */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -53,3 +54,5 @@ module.exports = merge(base, {
|
||||||
publicPath: '/browser/',
|
publicPath: '/browser/',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* eslint-enable import/no-commonjs */
|
||||||
|
|
Loading…
Reference in a new issue