Skip to content

Commit

Permalink
Deprecate honorStyleSettings config setting
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicdoe committed Jun 11, 2018
1 parent 529a69e commit e87d36b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 3 additions & 5 deletions lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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',
Expand Down Expand Up @@ -64,6 +60,8 @@ export async function activate () {
scope.push(grammar.scopeName)
}
}))

deprecateConfig()
}

export function deactivate () {
Expand Down
2 changes: 1 addition & 1 deletion lib/linter-js-standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions lib/utils/deprecate-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @babel */

export default function () {
atom.config.unset('linter-js-standard.honorStyleSettings')
}

0 comments on commit e87d36b

Please sign in to comment.