From e87d36beb46ce274bc97b68e79be87a0acdb9826 Mon Sep 17 00:00:00 2001 From: Jakob Krigovsky Date: Mon, 11 Jun 2018 20:38:51 +0200 Subject: [PATCH] Deprecate `honorStyleSettings` config setting --- lib/init.js | 8 +++----- lib/linter-js-standard.js | 2 +- lib/utils/deprecate-config.js | 5 +++++ 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 lib/utils/deprecate-config.js diff --git a/lib/init.js b/lib/init.js index 09dbaa9..1c8fd4c 100644 --- a/lib/init.js +++ b/lib/init.js @@ -2,6 +2,7 @@ // Dependencies import { CompositeDisposable } from 'atom' +import deprecateConfig from './utils/deprecate-config' import styleSettings from './utils/style-settings' const scope = ['source.js', 'source.js.jsx', 'source.js.jquery', 'source.gfm', 'source.vue'] @@ -24,11 +25,6 @@ export const config = { description: 'Do not run if the project has configured ESLint', default: true }, - honorStyleSettings: { - type: 'boolean', - description: 'Honor code style settings on package.json', - default: true - }, showEslintRules: { type: 'boolean', title: 'Show ESLint Rules', @@ -64,6 +60,8 @@ export async function activate () { scope.push(grammar.scopeName) } })) + + deprecateConfig() } export function deactivate () { diff --git a/lib/linter-js-standard.js b/lib/linter-js-standard.js index b98f7f1..851b82a 100644 --- a/lib/linter-js-standard.js +++ b/lib/linter-js-standard.js @@ -32,7 +32,7 @@ module.exports = function (textEditor) { var fileScope = textEditor.getGrammar().scopeName var config = atom.config.get('linter-js-standard') - var opts = config.honorStyleSettings ? styleSettings.checkStyleSettings(filePath, textEditor) : {} + var opts = styleSettings.checkStyleSettings(filePath, textEditor) opts.filename = filePath diff --git a/lib/utils/deprecate-config.js b/lib/utils/deprecate-config.js new file mode 100644 index 0000000..5621330 --- /dev/null +++ b/lib/utils/deprecate-config.js @@ -0,0 +1,5 @@ +/** @babel */ + +export default function () { + atom.config.unset('linter-js-standard.honorStyleSettings') +}