Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechszocs committed Dec 7, 2022
1 parent 56a05de commit 66e08aa
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Expand Up @@ -3,3 +3,4 @@
/screenshots
**/node_modules
**/dist
**/.DS_Store
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,6 +3,7 @@
/screenshots
**/node_modules
**/dist
**/.DS_Store

# https://next.yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
Expand Down
3 changes: 1 addition & 2 deletions clean.sh
@@ -1,7 +1,6 @@
#!/bin/bash
set -euo pipefail

for dir in 'node_modules' 'dist'
do
for dir in node_modules dist; do
find . -type d -name "$dir" -prune -exec rm -rf {} \;
done
5 changes: 3 additions & 2 deletions generate-api-docs.sh
Expand Up @@ -6,7 +6,8 @@ yarn build-libs

mkdir -p docs/generated && rm -rf docs/generated/*

shopt -s globstar
cp packages/lib-*/dist/api/lib-*.api.json docs/generated
for dir in packages/lib-*; do
cp $dir/dist/api/$(basename $dir).api.json docs/generated
done

yarn api-documenter markdown -i docs/generated -o docs/generated/api
3 changes: 0 additions & 3 deletions packages/eslint-plugin-internal/src/rules/all-bases.js
Expand Up @@ -17,9 +17,6 @@ module.exports = {
// Enforce a maximum number of classes per file
'max-classes-per-file': 'off',

// This rule has inconsistent behavior and poor monorepo support, replaced by lib-restricted-external-imports
'import/no-extraneous-dependencies': 'off',

// Enforce imported external modules to be declared in dependencies or peerDependencies within the closest parent package.json
'lib-restricted-external-imports': [
'error',
Expand Down
Expand Up @@ -61,6 +61,16 @@ const checkImport = (context, node) => {
* Enforce imported external modules to be declared in `dependencies` or `peerDependencies`
* within the closest parent `package.json`.
*
* This rule is meant to replace `import/no-extraneous-dependencies` which seems to have
* some behavioral inconsistencies as well as suboptimal support for monorepo projects.
*
* This rule differs from `import/no-extraneous-dependencies` in the following ways:
* - only the first closest parent `package.json` found is taken into account
* - external modules must be declared in either `dependencies` or `peerDependencies`
* - supports optional criteria that determine whether a file should be linted
* - `includeFiles` and `excludeFiles` - `minimatch` compatible file glob patterns
* - `excludeModules` - external modules to exclude from linting
*
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-extensions/src/index.ts
Expand Up @@ -3,7 +3,7 @@
*
* @remarks
* This package provides extension types and corresponding type guard functions
* used to interpret these extensions at runtime.
* used to interpret the corresponding extension objects at runtime.
*
* @packageDocumentation
*/
Expand Down
6 changes: 0 additions & 6 deletions test.sh
Expand Up @@ -21,11 +21,5 @@ yarn lint
# Run unit tests
yarn test

# Ensure that Git repo is still clean
if [[ -n "$(git status --porcelain)" ]]; then
echo "Git repository is not clean, make sure that all changes are committed"
exit 1
fi

# Upload code coverage
./prow-codecov.sh 2>/dev/null

0 comments on commit 66e08aa

Please sign in to comment.