lint

Different lint.xml for different build types in Android Studio?

左心房为你撑大大i 提交于 2021-02-18 05:03:38
问题 I want to use different lint.xml files for release and debug build types in Android Studio. So, how can this be achieved? When I place lint.xml in someModule/src/debug and someModule/src/release folders (also, these folders contain only that lint.xml file and nothing more) gradle reacts as there is no any lint.xml file, If I place single lint.xml file under core module folder (someModule/)- gradle recognizes it, but in this case I can't use different settings depending on build type... 回答1:

Is there an elegant way to tell eslint to ensure that we're not using any ES6 syntax / functions?

邮差的信 提交于 2021-02-08 15:09:55
问题 Is there an elegant way to tell ESLint to ensure that we're not using any ES6 / EMCAScript 2015 syntax / functions? I've found the following answer somewhat helpful but it seems that it doesn't take care of everything (e.g. I don't see how to catch the usage of Object.assign()): How to disable usage of certain ES2015 features with ESLint 2? 回答1: eslint-plugin-es5 is the package dedicated to your use case. For example the rule es5/no-es6-static-methods forbids the usage of Object.assign . 来源:

Is there an elegant way to tell eslint to ensure that we're not using any ES6 syntax / functions?

主宰稳场 提交于 2021-02-08 15:01:27
问题 Is there an elegant way to tell ESLint to ensure that we're not using any ES6 / EMCAScript 2015 syntax / functions? I've found the following answer somewhat helpful but it seems that it doesn't take care of everything (e.g. I don't see how to catch the usage of Object.assign()): How to disable usage of certain ES2015 features with ESLint 2? 回答1: eslint-plugin-es5 is the package dedicated to your use case. For example the rule es5/no-es6-static-methods forbids the usage of Object.assign . 来源:

Is there an elegant way to tell eslint to ensure that we're not using any ES6 syntax / functions?

这一生的挚爱 提交于 2021-02-08 15:01:06
问题 Is there an elegant way to tell ESLint to ensure that we're not using any ES6 / EMCAScript 2015 syntax / functions? I've found the following answer somewhat helpful but it seems that it doesn't take care of everything (e.g. I don't see how to catch the usage of Object.assign()): How to disable usage of certain ES2015 features with ESLint 2? 回答1: eslint-plugin-es5 is the package dedicated to your use case. For example the rule es5/no-es6-static-methods forbids the usage of Object.assign . 来源:

How to set up actions in GitHub for new user?

不想你离开。 提交于 2021-02-08 08:32:15
问题 I just got a GitHub account and writing small scripts in Python which I am learning. While adding my code to GitHub I noticed there is an option to run tests/validation on my code but mine is empty. I googled around and found that lint and black and are good checks. I found this Action that I want to add - https://github.com/marketplace/actions/python-quality-and-format-checker There is a "script" and a "config" that I think I need to add/update somewhere. Also when I click "Use latest

How to set up actions in GitHub for new user?

匆匆过客 提交于 2021-02-08 08:31:53
问题 I just got a GitHub account and writing small scripts in Python which I am learning. While adding my code to GitHub I noticed there is an option to run tests/validation on my code but mine is empty. I googled around and found that lint and black and are good checks. I found this Action that I want to add - https://github.com/marketplace/actions/python-quality-and-format-checker There is a "script" and a "config" that I think I need to add/update somewhere. Also when I click "Use latest

Cannot set the default language in Android Studio

六眼飞鱼酱① 提交于 2021-02-07 06:17:36
问题 I am getting warnings in Android Studio about untranslated strings - it is telling me they have not been translated to English. This appears to be because I have an "en-rGB" resource folder. But I have tried to follow the instructions in lint to specify the default language, but this has not worked. I have the following strings.xml files: values/strings.xml : <resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en"> <string name="string1">Howdy</string> <string name=

Cannot set the default language in Android Studio

不羁岁月 提交于 2021-02-07 06:17:30
问题 I am getting warnings in Android Studio about untranslated strings - it is telling me they have not been translated to English. This appears to be because I have an "en-rGB" resource folder. But I have tried to follow the instructions in lint to specify the default language, but this has not worked. I have the following strings.xml files: values/strings.xml : <resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en"> <string name="string1">Howdy</string> <string name=

Can't get Atom Linter to work

我怕爱的太早我们不能终老 提交于 2021-02-06 09:35:06
问题 I'm new to Atom, the text edit, and I installed many packages, including Linter https://github.com/AtomLinter/Linter But it's not showing errors or highlighting code, it's just getting ignored. Do any of you know what I should do to get this to work? 回答1: You have to additionally install a linter package for your desired language. Here is a list: https://atomlinter.github.io/ 回答2: I needed to remove atom config and start from scratch to make linter working mv ~/.atom ~/.atom.bak 回答3: Instead

ESLint rule for camelCased argument names

痴心易碎 提交于 2021-01-29 03:05:17
问题 I want to use camelCase function argument names: myFunc(goodArg, BadArg) { ... } I found ESLint's camelcase rule. Unfortunately it does not apply to argument names, just variables and properties. Is there a way to automatically just function argument names? I don't mind using another linter if it helps. 来源: https://stackoverflow.com/questions/36777168/eslint-rule-for-camelcased-argument-names