-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix type errors and upgrade ncc
- Loading branch information
1 parent
9ed4939
commit 1cfa4f7
Showing
31 changed files
with
7,910 additions
and
685 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* TL;DR: Don't touch this. | ||
* | ||
* DO NOT EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND COMPILED FROM AN | ||
* EXTERNAL REGEXPS DATABASE. TO UPDATE THIS FILE MANUALLY PLEASE RUN THE: | ||
* | ||
* ``` | ||
* npm run update | ||
* ``` | ||
* | ||
* COMMAND FROM THE ROOT OF THIS REPOSITORY. IF YOU FOUND A REGULAR EXPRESSION THAT | ||
* IS BROKEN OR MISSING. PLEASE MAKE THE PULL REQUESTS TO REGEXP DATABASE NOT TO | ||
* THIS MODULE AS THEY WILL BE REJECTED INSTANTLY. THE SOURCE FILE LOCATION CAN | ||
* BE FOUND IN THE `update.js` FILE WHICH IS IN THE SAME FOLDER AS THIS FILE. PLEASE | ||
* SEE THE `exports.remote` PART OF THE FILE. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "https://raw.githubusercontent.com/todogroup/repolinter/master/fixes/file-create-config.json", | ||
"type": "object", | ||
"properties": { | ||
"file": { "type": "string" }, | ||
"text": { | ||
"oneOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { "url": { "type": "string" } } | ||
}, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { "file": { "type": "string" } } | ||
} | ||
] | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "https://raw.githubusercontent.com/todogroup/repolinter/master/fixes/file-create-config.json", | ||
"type": "object", | ||
"properties": { | ||
"file": { "type": "string" }, | ||
"text": { | ||
"oneOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { "url": { "type": "string" } } | ||
}, | ||
"replace": { | ||
"type": "boolean", | ||
"default": false | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { "file": { "type": "string" } } | ||
} | ||
] | ||
}, | ||
"required": ["file", "text"] | ||
"replace": { | ||
"type": "boolean", | ||
"default": false | ||
} | ||
}, | ||
"required": ["file", "text"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "https://raw.githubusercontent.com/todogroup/repolinter/master/fixes/file-modify-config.json", | ||
"type": "object", | ||
"properties": { | ||
"nocase": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"newlines": { | ||
"type": "object", | ||
"default": {}, | ||
"properties": { | ||
"begin": { "type": "number", "default": 0 }, | ||
"end": { "type": "number", "default": 0 } | ||
} | ||
}, | ||
"files": { | ||
"type": "array", | ||
"items": { "type": "string" } | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "https://raw.githubusercontent.com/todogroup/repolinter/master/fixes/file-modify-config.json", | ||
"type": "object", | ||
"properties": { | ||
"nocase": { | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"newlines": { | ||
"type": "object", | ||
"default": {}, | ||
"properties": { | ||
"begin": { "type": "number", "default": 0 }, | ||
"end": { "type": "number", "default": 0 } | ||
} | ||
}, | ||
"files": { | ||
"type": "array", | ||
"items": { "type": "string" } | ||
}, | ||
"skip-paths-matching": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"extensions": { | ||
"type": "array", | ||
"items": { "type": "string" } | ||
}, | ||
"skip-paths-matching": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"extensions": { | ||
"type": "array", | ||
"items": { "type": "string" } | ||
}, | ||
"patterns": { | ||
"type": "array", | ||
"items": { "type": "string" } | ||
}, | ||
"flags": { "type": "string" } | ||
}, | ||
"required": ["patterns"] | ||
"patterns": { | ||
"type": "array", | ||
"items": { "type": "string" } | ||
}, | ||
"text": { | ||
"oneOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { "url": { "type": "string" } } | ||
}, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { "file": { "type": "string" } } | ||
} | ||
] | ||
"flags": { "type": "string" } | ||
}, | ||
"required": ["patterns"] | ||
}, | ||
"text": { | ||
"oneOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { "url": { "type": "string" } } | ||
}, | ||
"write_mode": { | ||
"default": "append", | ||
"enum": ["prepend", "append"] | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { "file": { "type": "string" } } | ||
} | ||
] | ||
}, | ||
"required": ["text"] | ||
"write_mode": { | ||
"default": "append", | ||
"enum": ["prepend", "append"] | ||
} | ||
}, | ||
"required": ["text"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env ruby | ||
# encoding: UTF-8 | ||
# Modified github_markup utility which checks first that the file can be rendered before rendering | ||
|
||
$LOAD_PATH.unshift File.dirname(File.realpath(__FILE__)) + "/../lib" | ||
require 'github/markup' | ||
require 'charlock_holmes' | ||
|
||
if ARGV.size < 1 | ||
print "usage: #{File.basename($0)} FILE\n" | ||
exit 1 | ||
end | ||
|
||
name = ARGV.first | ||
file_contents = nil | ||
|
||
begin | ||
file = File.open( name, "r" ) | ||
encoded_contents = file.read | ||
file.close | ||
detection = CharlockHolmes::EncodingDetector.detect(encoded_contents) | ||
file_contents = encoded_contents.encode("UTF-8", detection[:encoding], invalid: :replace, replace: "") | ||
rescue Exception => e | ||
$stderr.print "error: #{e.message}\n" | ||
exit 1 | ||
ensure | ||
end | ||
|
||
|
||
if GitHub::Markup.can_render?( name, file_contents ) | ||
print GitHub::Markup.render( name, file_contents ) | ||
exit 0 | ||
else | ||
print "File '#{name}' cannot be rendered.\n" | ||
exit 1 | ||
end |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.