CI(.arclint): use pinterest-linters

Summary:
Thanks pinterest!

Also:
- fix yamllint and update .gitattributes, and make deploy.sh executable by `chmod +x`.
- install linting npm packages.

Signed-off-by: Yongmin Hong <revi@omglol.email>

Test Plan: `arc lint`

Reviewers: O1 revi & automations, revi

Reviewed By: O1 revi & automations, revi

Differential Revision: https://issuetracker.revi.xyz/D326
This commit is contained in:
revi 2024-06-16 17:26:19 +09:00
parent 94d38f2ab6
commit f85a6a2b90
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94
11 changed files with 1959 additions and 60 deletions

View file

@ -1,3 +1,4 @@
{ {
"phabricator.uri": "https://issuetracker.revi.xyz" "phabricator.uri": "https://issuetracker.revi.xyz",
"load": [".pinterest-linters"]
} }

View file

@ -1,7 +1,5 @@
{ {
"exclude": [ "exclude": ["(^package-lock.json$)"],
"(^package-lock.json$)"
],
"linters": { "linters": {
"chmod": { "chmod": {
"type": "chmod" "type": "chmod"
@ -11,12 +9,7 @@
}, },
"jshint": { "jshint": {
"type": "jshint", "type": "jshint",
"include": [ "include": ["(\\.cjs$)", "(\\.js$)", "(\\.jsx$)", "(\\.mjs$)"],
"(\\.cjs$)",
"(\\.js$)",
"(\\.jsx$)",
"(\\.mjs$)"
],
"jshint.jshintrc": ".jshint.json" "jshint.jshintrc": ".jshint.json"
}, },
"json": { "json": {
@ -40,10 +33,7 @@
}, },
"text": { "text": {
"type": "text", "type": "text",
"exclude": [ "exclude": ["(^.gitignore$)", "(\\.md$)"],
"(^.gitignore$)",
"(\\.md$)"
],
"text.max-line-length": 80, "text.max-line-length": 80,
"severity": { "severity": {
"1": "autofix", "1": "autofix",
@ -54,16 +44,17 @@
}, },
"text-markdown": { "text-markdown": {
"type": "text", "type": "text",
"include": [ "include": ["(^.gitignore$)", "(\\.md$)"],
"(^.gitignore$)",
"(\\.md$)"
],
"severity": { "severity": {
"1": "autofix", "1": "autofix",
"2": "advice", "2": "advice",
"3": "disabled", "3": "disabled",
"5": "disabled" "5": "disabled"
} }
},
"yaml lint": {
"type": "yamllint",
"include": ["(\\.yaml$)", "(\\.yml$)", "(^.yamllint$)"]
} }
} }
} }

10
.gitattributes vendored
View file

@ -12,14 +12,18 @@
*.webp binary *.webp binary
*.woff2 binary *.woff2 binary
.bash* diff=bash
*.css diff=css *.css diff=css
*.html diff=html *.html diff=html
*.md diff=markdown *.md diff=markdown
*.mdx diff=markdown *.mdx diff=markdown
*.php diff=php
*.py diff=python
*.sh diff=bash *.sh diff=bash
# GitHub Linguist detection # GitHub Linguist detection
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md # https://github.com/github-linguist/linguist/blob/master/docs/overrides.md
.arclint linguist-language=json .arclint linguist-language=json
.gitaliases linguist-language=gitconfig .gitaliases linguist-language=gitconfig
.yamllint linguist-language=yaml .yamllint linguist-language=yaml
default.git* linguist-language=gitconfig

4
.gitmodules vendored Normal file
View file

@ -0,0 +1,4 @@
# @generated
[submodule ".pinterest-linters"]
path = .pinterest-linters
url = https://github.com/pinterest/arcanist-linters.git

1
.pinterest-linters Submodule

@ -0,0 +1 @@
Subproject commit 57a316545efd54cb590d41b24e644fc6e6e7736a

View file

@ -1,2 +1,3 @@
LICENSE LICENSE
node_modules node_modules/
.pinterest-linters/

View file

@ -1,8 +0,0 @@
# https://prettier.io/docs/en/configuration
# Prettier configuration
bracketSpacing: false
bracketSameLine: true
proseWrap: preserve
singleQuote: true
trailingComma: all

View file

@ -1,36 +1,25 @@
--- ---
yaml-files: yaml-files:
- '*.yaml' - '*.yaml'
- '*.yml' - '*.yml'
- '.yamllint' - '.yamllint'
extends: default
ignore-from-file: .gitignore
rules: rules:
anchors: enable comments-indentation: {}
braces: enable document-start:
brackets: enable present: true
colons: enable
commas: enable
comments:
level: warning level: warning
comments-indentation:
level: warning
document-end: disable
document-start: disable
empty-lines: enable
empty-values: disable
float-values: disable
hyphens: enable
indentation: enable
key-duplicates: enable
key-ordering: disable
line-length: line-length:
max: 80
level: warning level: warning
new-line-at-end-of-file: new-line-at-end-of-file:
level: warning level: warning
new-lines: enable
octal-values: disable
quoted-strings: disable quoted-strings: disable
trailing-spaces: enable
truthy: truthy:
level: warning level: warning
# on: included because GitHub Actions
allowed-values: ['on', 'true', 'false']

0
deploy.sh Normal file → Executable file
View file

1917
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,22 @@
{ {
"$schema": "https://json.schemastore.org/package.json",
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.5.0",
"@revi/eslint-config": "^0.0.2",
"@revi/prettier-config": "^0.0.2",
"eslint": "^9.5.0",
"eslint-config-prettier": "^9.1.0",
"jshint": "^2.13.6", "jshint": "^2.13.6",
"prettier": "^3.3.1" "prettier": "^3.3.2"
},
"prettier": "@revi/prettier-config",
"name": "@revi/dots",
"private": true,
"license": "Apache-2.0",
"author": {
"name": "Yongmin Hong",
"url": "https://revi.xyz",
"email": "revi@omglol.email"
}, },
"scripts": { "scripts": {
"p:c": "prettier --check", "p:c": "prettier --check",