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

10
.gitattributes vendored
View file

@ -12,14 +12,18 @@
*.webp binary
*.woff2 binary
.bash* diff=bash
*.css diff=css
*.html diff=html
*.md diff=markdown
*.mdx diff=markdown
*.php diff=php
*.py diff=python
*.sh diff=bash
# GitHub Linguist detection
# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md
.arclint linguist-language=json
.gitaliases linguist-language=gitconfig
.yamllint linguist-language=yaml
.arclint linguist-language=json
.gitaliases linguist-language=gitconfig
.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
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'
- '*.yml'
- '.yamllint'
extends: default
ignore-from-file: .gitignore
rules:
anchors: enable
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
comments-indentation: {}
document-start:
present: true
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:
max: 80
level: warning
new-line-at-end-of-file:
level: warning
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy:
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": {
"@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",
"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": {
"p:c": "prettier --check",