-
Notifications
You must be signed in to change notification settings - Fork 32
Airbnb is overriding my local config on 'Fix on Save' #197
Comments
Is there supposed to be a 'none' option? I cannot see it, even after restarting Atom. |
regression from f13fc77 /cc @casesandberg |
Fix published in v3.4.8, can you verify @HauptmannEck? |
Verified the fix, all is well. |
Glad to hear it 😉. |
Not fixed for me, but I'm having some issues with atom cache so I'm not 100% positive. But reading the code, it's not fixed yet. It still checks for |
@casesandberg Looks like v3.4.7 didn't fully take into account the places presets are looked at, mind taking a look? |
When linter-jscs is enabled and my .jscsrc file is located in my project folder, linter-jscs is changing between the (probably) airbnb and my preset on each save. Which means i save my file once and it fixes with my preset and if i save again, it fixes with (probably) Airbnb preset. My package config is: Config file path: (empty), Esnext: false, Fix on save: true, Only config: true. |
Please add the static config = {
preset: {
title: 'Preset',
description: 'Preset option is ignored if a config file is found for the linter.',
type: 'string',
default: 'airbnb',
enum: ['<none>', 'airbnb', 'crockford', 'google', 'grunt', 'idiomatic', 'jquery', 'mdcs', 'node-style-guide', 'wikimedia', 'wordpress', 'yandex'],
}, By the way, I am using this {
"requireBlocksOnNewline": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": ["if", "else", "for", "try", "catch"],
"requireDotNotation": true,
"requireLineFeedAtFileEnd": true,
"requireOperatorBeforeLineBreak": true,
"requireParenthesesAroundIIFE": true,
"requireSpaceBetweenArguments": true,
"requireSpacesInCallExpression": true,
"requireSpacesInForStatement": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": true,
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpaceBeforeObjectValues": true,
"requireSpacesInConditionalExpression": true,
"requireSpacesInFunction": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"disallowEmptyBlocks": true,
"disallowKeywordsOnNewLine": ["else", "catch"],
"disallowNewlineBeforeBlockStatements": true,
"disallowPaddingNewlinesInBlocks": false,
"disallowQuotedKeysInObjects": true,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpaceAfterObjectKeys": { "allExcept": ["method"] },
"disallowSpacesInsideArrayBrackets": { "allExcept": [ "}", "]" ]},
"disallowSpacesInsideObjectBrackets": { "allExcept": [ "}", "]" ]},
"disallowYodaConditions": true,
"safeContextKeyword": ["self"],
"jsDoc": {
"checkParamNames": true,
"checkRedundantParams": true,
"requireParamTypes": true
},
"validateIndentation": 2,
"validateParameterSeparator": ", ",
"validateQuoteMarks": "'",
"maximumLineLength": {
"value": 120,
"allowUrlComments": true,
"allowRegex": true
},
"esnext": true,
"requireSemicolons": true
} |
@epsitec There should be no need of that setting, the fact that Fix on Save wasn't properly updated to not need it doesn't mean it should be added back... As it looks like @casesandberg hasn't had time to look into this I'll see if I can as it seems nobody has put up a PR fixing this. |
@Arcanemagus that would be nice. I have no idea how you would debug the plugin in atom while it is running, so I'll happily let somebody else who is more comfortable with the idea propose a PR. |
fixOnSave could potentially use the preset if one wasn't defined in the supplied configuration. Fixes #197.
fixOnSave could potentially use the preset if one wasn't defined in the supplied configuration. Fixes #197.
Okay, real fix is published in v3.4.9. Please verify that it's working properly for you. |
Now It's seems to be working for me. Thanks! |
OK for me too. |
Version
3.4.7
Issue
Using the rule:
disallowTrailingComma
When 'Fix on Save' and 'Only Config' is selected with a preset of 'airbnb', instead on removing the trailing commas, it adds them. Then errors that there are trailing spaces.
If I switch to 'google' as a preset then they problem goes away.
The text was updated successfully, but these errors were encountered: