-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ac471dc
Showing
16 changed files
with
5,474 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
node_modules |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit "${1}"; |
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,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright 2022-2022 Stack Exchange Inc. | ||
|
||
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. |
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,41 @@ | ||
{ | ||
"name": "stacks-utils", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "monorepo for Stacks config files and other utilities", | ||
"author": "", | ||
"license": "MIT", | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"scripts": { | ||
"lint:eslint": "eslint .", | ||
"lint:prettier": "prettier --check . --end-of-line auto", | ||
"prepare": "husky install" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.3", | ||
"eslint": "^8.22.0", | ||
"husky": "^8.0.1", | ||
"prettier": "^2.7.1" | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@stackoverflow/commitlint-config" | ||
] | ||
}, | ||
"eslintConfig": { | ||
"env": { | ||
"node": true | ||
}, | ||
"parserOptions": { | ||
"project": [ | ||
"./tsconfig.json" | ||
] | ||
}, | ||
"extends": [ | ||
"@stackoverflow" | ||
] | ||
}, | ||
"prettier": "@stackoverflow/prettier-config" | ||
} |
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,15 @@ | ||
module.exports = [ | ||
"last 2 versions", | ||
"not dead", | ||
"not ie > 0", | ||
"not op_mini all", | ||
"not baidu > 0", | ||
"not and_ff > 0", | ||
"not and_qq > 0", | ||
"not kaios > 0", | ||
"not op_mob > 0", | ||
"not ie_mob > 0", | ||
"not and_uc > 0", | ||
"not Samsung > 0", | ||
"not Android > 0", | ||
]; |
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,21 @@ | ||
{ | ||
"name": "@stackoverflow/browserslist-config", | ||
"version": "1.0.0", | ||
"description": "Stacks Browserslist shared config", | ||
"main": "index.js", | ||
"author": "Stack Exchange Inc", | ||
"license": "MIT", | ||
"keywords": [ | ||
"stacks", | ||
"browserslist", | ||
"browserslist-config" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/StackExchange/stacks-utils.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/StackExchange/stacks-utils/issues" | ||
}, | ||
"homepage": "https://github.com/StackExchange/stacks-utils#readme" | ||
} |
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,6 @@ | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
rules: { | ||
"scope-empty": [2, "never"], | ||
}, | ||
}; |
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,24 @@ | ||
{ | ||
"name": "@stackoverflow/commitlint-config", | ||
"version": "1.0.0", | ||
"description": "Stacks CommitLint shared config", | ||
"main": "index.js", | ||
"author": "Stack Exchange Inc", | ||
"license": "MIT", | ||
"keywords": [ | ||
"stacks", | ||
"commitlint", | ||
"commitlint-config" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/StackExchange/stacks-utils.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/StackExchange/stacks-utils/issues" | ||
}, | ||
"homepage": "https://github.com/StackExchange/stacks-utils#readme", | ||
"dependencies": { | ||
"@commitlint/config-conventional": "^17.0.3" | ||
} | ||
} |
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,42 @@ | ||
module.exports = { | ||
plugins: ["@typescript-eslint", "jest"], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"prettier", | ||
"plugin:no-unsanitized/DOM", | ||
], | ||
rules: { | ||
"no-console": "error", | ||
"no-alert": "error", | ||
"no-process-env": "error", | ||
}, | ||
overrides: [ | ||
{ | ||
// enable | ||
files: ["**/*.ts", "**/*.tsx"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
}, | ||
}, | ||
{ | ||
// only enable jest rules in non-e2e test files | ||
files: ["**/!(*.e2e).test.ts"], | ||
extends: ["plugin:jest/recommended", "plugin:jest/style"], | ||
rules: { | ||
"jest/no-disabled-tests": "off", | ||
"jest/consistent-test-it": ["error", { fn: "it" }], | ||
}, | ||
}, | ||
{ | ||
// enable a subset of jest rules in e2e test files, since the syntax is similar-ish | ||
files: ["**/*.e2e.test.ts"], | ||
extends: ["plugin:jest/recommended"], | ||
rules: { | ||
"jest/no-standalone-expect": "off", | ||
}, | ||
}, | ||
], | ||
}; |
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,31 @@ | ||
{ | ||
"name": "@stackoverflow/eslint-config", | ||
"version": "1.0.0", | ||
"description": "Stacks ESLint shared config", | ||
"main": "index.js", | ||
"author": "Stack Exchange Inc", | ||
"license": "MIT", | ||
"keywords": [ | ||
"stacks", | ||
"eslint", | ||
"eslint-config" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/StackExchange/stacks-utils.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/StackExchange/stacks-utils/issues" | ||
}, | ||
"homepage": "https://github.com/StackExchange/stacks-utils#readme", | ||
"peerDependencies": { | ||
"eslint": ">=8" | ||
}, | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.33.1", | ||
"@typescript-eslint/parser": "^5.33.1", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-jest": "^26.8.3", | ||
"eslint-plugin-no-unsanitized": "^4.0.1" | ||
} | ||
} |
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,8 @@ | ||
module.exports = { | ||
tabWidth: 4, | ||
semi: true, | ||
singleQuote: false, | ||
quoteProps: "consistent", | ||
trailingComma: "es5", | ||
printWidth: 80, | ||
}; |
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,24 @@ | ||
{ | ||
"name": "@stackoverflow/prettier-config", | ||
"version": "1.0.0", | ||
"description": "Stacks Prettier shared config", | ||
"main": "index.js", | ||
"author": "Stack Exchange Inc", | ||
"license": "MIT", | ||
"keywords": [ | ||
"stacks", | ||
"prettier", | ||
"prettier-config" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/StackExchange/stacks-utils.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/StackExchange/stacks-utils/issues" | ||
}, | ||
"homepage": "https://github.com/StackExchange/stacks-utils#readme", | ||
"peerDependencies": { | ||
"prettier": ">=2" | ||
} | ||
} |
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,19 @@ | ||
{ | ||
"name": "@stackoverflow/tsconfig", | ||
"version": "1.0.0", | ||
"description": "Stacks base TSConfig file", | ||
"author": "Stack Exchange Inc", | ||
"license": "MIT", | ||
"keywords": [ | ||
"stacks", | ||
"tsconfig" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/StackExchange/stacks-utils.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/StackExchange/stacks-utils/issues" | ||
}, | ||
"homepage": "https://github.com/StackExchange/stacks-utils#readme" | ||
} |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"sourceMap": true, | ||
"noImplicitAny": true, | ||
"module": "esnext", | ||
"target": "es6", | ||
"allowJs": true, | ||
"esModuleInterop": true, | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
"skipLibCheck": true, | ||
"resolveJsonModule": true | ||
}, | ||
"$schema": "https://json.schemastore.org/tsconfig", | ||
"display": "Stacks" | ||
} |
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,6 @@ | ||
{ | ||
"extends": "./packages/tsconfig/tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./tmp" | ||
} | ||
} |