Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .alexignore

This file was deleted.

37 changes: 0 additions & 37 deletions .alexrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ If possible, test any visual changes in all latest versions of the following bro

### Push it

1. Run `yarn prettier` and `yarn language:lint` in `./website` directory to ensure your changes are consistent with other files in the repo.
1. Run `yarn lint` and `yarn prettier` in `./website` directory to ensure your changes are consistent with other files in the repo.
1. Run `yarn update-lock` to [deduplicate dependencies](https://yarnpkg.com/cli/dedupe).
1. `git add -A && git commit -m "My message"` to stage and commit your changes.
> replace `My message` with a commit message, such as `Fixed header logo on Android`
Expand Down
35 changes: 35 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import * as eslintPluginMdx from 'eslint-plugin-mdx';
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
import eslintPluginYml from 'eslint-plugin-yml';
import eslintTs from 'typescript-eslint';
import eslintPluginAlex from 'eslint-plugin-alex';

export default defineConfig([
globalIgnores([
Expand Down Expand Up @@ -104,9 +105,43 @@ export default defineConfig([
remarkConfigPath: 'website/.remarkrc.mjs',
}),
plugins: {
alex: eslintPluginAlex,
'case-police': eslintPluginCasePolice,
},
rules: {
'alex/no-problematic-language': [
'warn',
{
ignore: [
`CODE_OF_CONDUCT.md`,
// skip older blog posts
`website/blog/201*`,
],
alexOptions: {
// use a "maybe" level of profanity instead of the default "unlikely"
profanitySureness: 1,
allow: [
// we frequently refer to form props by their name "disabled"
'invalid',
// unfortunately "watchman" is a library name that we depend on
'watchman-watchwoman',
// ignore rehab rule, Detox is an e2e testing library
'rehab',
// host refers to host objects in native code
'host-hostess',
// allowing this term to prevent reporting "primitive", which is a programming term
'savage',
// allowing this term, since it seems to be used not in insensitive cases
'straightforward',
// allowing those terms, since they refer to colors and the surname of one of core contributors
'black',
'white',
// allowing this term, since we use it for expressing gratitude for certain contributors
'special',
],
},
},
],
'case-police/string-check': [
'warn',
{
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
"@eslint/js": "^9.39.1",
"@manypkg/cli": "^0.25.1",
"@typescript-eslint/parser": "^8.47.0",
"alex": "^11.0.1",
"case-police": "^2.1.1",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-alex": "^1.0.0",
"eslint-plugin-case-police": "2.1.1",
"eslint-plugin-mdx": "^3.6.2",
"eslint-plugin-prettier": "^5.5.4",
Expand Down
5 changes: 1 addition & 4 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
"lint:examples": "eslint-examples-jsx && eslint-examples-tsx && tsc-examples",
"lint:markdown:images": "node ../scripts/src/image-check.ts",
"lint:markdown:links": "remark ../docs --quiet -r .remarkrc.withBrokenLinks.mjs",
"language:lint": "cd ../ && alex",
"language:lint:versioned": "cd ../ && alex .",
"ci:lint": "yarn lint:examples && yarn language:lint:versioned && yarn lint:markdown:images && prettier --check src/**/*.scss",
"ci:lint": "yarn lint:examples && yarn lint:markdown:images && prettier --check src/**/*.scss",
"pwa:generate": "npx pwa-asset-generator ./static/img/header_logo.svg ./static/img/pwa --padding '40px' --background 'rgb(32, 35, 42)' --icon-only --opaque true",
"update-redirects": "node ../scripts/src/update-redirects.ts"
},
Expand Down Expand Up @@ -65,7 +63,6 @@
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.2",
"@types/google.analytics": "^0.0.46",
"@types/react": "^19.1.17",
"alex": "^11.0.1",
"eslint": "^9.39.1",
"glob": "^13.0.0",
"prettier": "^3.6.2",
Expand Down
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9166,6 +9166,18 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-alex@npm:^1.0.0":
version: 1.0.0
resolution: "eslint-plugin-alex@npm:1.0.0"
dependencies:
micromatch: "npm:^4.0.8"
peerDependencies:
alex: ^11.0.0
eslint: ">=8.56.0 || >=9.0.0"
checksum: 10c0/1f8a048a1f91244217c1c54b5c8b254b9f2e107b50e27df7c5c819b9290c14083354ce764a1abbe6195dd38b128bfb919d240409cbf895279ec9870add53b824
languageName: node
linkType: hard

"eslint-plugin-case-police@npm:2.1.1":
version: 2.1.1
resolution: "eslint-plugin-case-police@npm:2.1.1"
Expand Down Expand Up @@ -17827,9 +17839,11 @@ __metadata:
"@eslint/js": "npm:^9.39.1"
"@manypkg/cli": "npm:^0.25.1"
"@typescript-eslint/parser": "npm:^8.47.0"
alex: "npm:^11.0.1"
case-police: "npm:^2.1.1"
eslint: "npm:^9.39.1"
eslint-config-prettier: "npm:^10.1.8"
eslint-plugin-alex: "npm:^1.0.0"
eslint-plugin-case-police: "npm:2.1.1"
eslint-plugin-mdx: "npm:^3.6.2"
eslint-plugin-prettier: "npm:^5.5.4"
Expand Down Expand Up @@ -17859,7 +17873,6 @@ __metadata:
"@signalwire/docusaurus-plugin-llms-txt": "npm:^1.2.2"
"@types/google.analytics": "npm:^0.0.46"
"@types/react": "npm:^19.1.17"
alex: "npm:^11.0.1"
docusaurus-plugin-sass: "npm:^0.2.6"
eslint: "npm:^9.39.1"
glob: "npm:^13.0.0"
Expand Down