mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Check license header using eslint (#2780)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
c594844b9b
commit
f8b939bf59
31 files changed
+576
-34
No files matched your search
+28
-1
@@ -1,3 +1,24 @@
|
||||
/**
|
||||
* Copyright (c) 2021 OpenLens Authors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
const packageJson = require("./package.json");
|
||||
|
||||
module.exports = {
|
||||
@@ -27,9 +48,11 @@ module.exports = {
|
||||
sourceType: "module",
|
||||
},
|
||||
plugins: [
|
||||
"unused-imports"
|
||||
"header",
|
||||
"unused-imports",
|
||||
],
|
||||
rules: {
|
||||
"header/header": [2, "./license-header"],
|
||||
"indent": ["error", 2, {
|
||||
"SwitchCase": 1,
|
||||
}],
|
||||
@@ -72,6 +95,7 @@ module.exports = {
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
],
|
||||
plugins: [
|
||||
"header",
|
||||
"unused-imports"
|
||||
],
|
||||
parserOptions: {
|
||||
@@ -79,6 +103,7 @@ module.exports = {
|
||||
sourceType: "module",
|
||||
},
|
||||
rules: {
|
||||
"header/header": [2, "./license-header"],
|
||||
"no-invalid-this": "off",
|
||||
"@typescript-eslint/no-invalid-this": ["error"],
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
@@ -127,6 +152,7 @@ module.exports = {
|
||||
],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: [
|
||||
"header",
|
||||
"unused-imports"
|
||||
],
|
||||
extends: [
|
||||
@@ -139,6 +165,7 @@ module.exports = {
|
||||
jsx: true,
|
||||
},
|
||||
rules: {
|
||||
"header/header": [2, "./license-header"],
|
||||
"no-invalid-this": "off",
|
||||
"@typescript-eslint/no-invalid-this": ["error"],
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
|
||||
Reference in new issue
Block a user