Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-685: Use prettier linter #1835

Merged
merged 9 commits into from
Sep 22, 2023
Merged

Conversation

npentrel
Copy link
Collaborator

@npentrel npentrel commented Sep 14, 2023

It would appear prettier for markdown is an all or nothing kind of linter. There is no way to to turn off ANY rules for markdown linting. So whether we want to use it, is up to us:

Advantages:

  • It does automatically format JSON objects and JS and TS code and we will never again need to think about that.
  • It catches mistakes in numbering like here in docs/try-viam/rover-resources/rover-tutorial-fragments.md
  • It changes *-emphasis markers to _-markers - I don't care which one, but it is nice that it enforces one style I think

Disadvantages:

<!-- prettier-ignore -->

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Sep 14, 2023
@npentrel npentrel marked this pull request as draft September 14, 2023 20:23
@viambot
Copy link
Member

viambot commented Sep 14, 2023

Overall readability score: 55.78 (🟢 +1.33)

File Readability
_index.md 100 (🟢 +0)
_index.md 100 (🟢 +0)
contribute.md 64.17 (🟢 +0)
api-namespace-triplet.md 35.05 (🟢 +0)
attribute.md 32.84 (🟢 +0)
index.md 100 (🟢 +0)
model.md 15.1 (🟢 +0)
part.md 14.79 (🟢 +0)
robot.md 16.83 (🟢 +0)
type.md 7.5 (🟢 +0)
viam-robot-api.md 54.05 (🟢 +0)
learning-resources.md 57 (🟢 +0)
local-configuration-file.md 52.01 (🟢 +22.79)
release-notes.md 31.69 (🟢 +0.69)
troubleshooting.md 58.18 (🟢 +0)
_index.md 39.5 (🟢 +0)
_index.md 63.65 (🟢 +0)
eva.md 38.76 (🟢 +0)
fake.md 49.06 (🟢 +0)
ur5e.md 60.91 (🟢 +0)
xarm6.md 55.8 (🟢 +0)
xarm7.md 55.8 (🟢 +0)
xarmlite.md 57.4 (🟢 +0)
yahboom-dofbot.md 60.16 (🟢 +0)
_index.md 68.02 (🟢 +0)
agilex-limo.md 47.69 (🟢 +0)
boat.md 67 (🟢 +0)
fake.md 49.51 (🟢 +0)
wheeled.md 55.75 (🟢 +0)
_index.md 61.61 (🟢 +0)
beaglebone.md 43.83 (🟢 +0)
fake.md 60.14 (🟢 +0)
jetson.md 50.03 (🟢 +0)
numato.md 49.88 (🟢 +0)
pca9685.md 70.47 (🟢 +0)
pi.md 56.04 (🟢 +0)
ti.md 46.61 (🟢 +0)
upboard.md 52.06 (🟢 +0)
_index.md 59.52 (🟢 +0)
align-color-depth-extrinsics.md 61.46 (🟢 +0)
align-color-depth-homography.md 59.4 (🟢 +0)
calibrate.md 45.22 (🟢 +0)
dual-stream.md 64.23 (🟢 +0)
fake.md 64.81 (🟢 +0)
ffmpeg.md 67.06 (🟢 +0)
image-file.md 69.57 (🟢 +0)
join-color-depth.md 63.99 (🟢 +0)
join-pointclouds.md 60.74 (🟢 +0)
rtsp.md 61.27 (🟢 +0)
single-stream.md 67.92 (🟢 +0)
transform.md 59.65 (🟢 +0)
velodyne.md 19.81 (🟢 +0)
webcam.md 60.83 (🟢 +0)
_index.md 59.17 (🟢 +0)
model1.md 46.96 (🟢 +0)
_index.md 59.94 (🟢 +0)
AMS-AS5048.md 44.19 (🟢 +0)
arduino.md 63.51 (🟢 +0)
fake.md 56.25 (🟢 +0)
incremental.md 42.77 (🟢 +0)
single.md 51.42 (🟢 +0)
_index.md 67.5 (🟢 +0)
fake.md 56.43 (🟢 +0)
multi-axis.md 60.36 (🟢 +0)
single-axis.md 62.1 (🟢 +0)
_index.md 60.59 (🔴 -0.15)
fake.md 57.53 (🟢 +0)
softrobotics.md 56.88 (🟢 +11.12)
_index.md 54.47 (🟢 +0.02)
gamepad.md 64.52 (🟢 +0)
gpio.md 59.32 (🟢 +0)
mux.md 42.25 (🟢 +0)
_index.md 64.27 (🟢 +7.03)
28byj48.md 44.07 (🟢 +18.41)
dmc4000.md 66.34 (🟢 +4.29)
fake.md 65.88 (🟢 +9.08)
_index.md 71.92 (🟢 +10.01)
encoded-motor.md 31.92 (🟢 +20.06)
gpiostepper.md 55.31 (🟢 +29.53)
roboclaw.md 52.43 (🟢 +0)
tmc5072.md 64.1 (🟢 +3.74)
_index.md 62.2 (🟢 +3.59)
adxl345.md 59.76 (🟢 +17.13)
cameramono.md 25.14 (🟢 +23.42)
fake.md 32.51 (🟢 +29.41)
_index.md 100 (🟢 +0)
gps-nmea-rtk-pmtk.md 52.6 (🟢 +0)
gps-nmea-rtk-serial.md 48.27 (🟢 +0)
gps-nmea.md 55.91 (🟢 +16.38)
_index.md 100 (🟢 +0)
imu-vectornav.md 41.1 (🟢 +21.81)
imu-wit.md 45.07 (🟢 +13.05)
merged.md 51.3 (🟢 +0)
mpu6050.md 41.8 (🟢 +18.7)
viam-visual-odometry.md 56.4 (🟢 +4.87)
wheeled-odometry.md 54 (🔴 -0.15)
pose-tracker.md 73.11 (🟢 +0)
_index.md 59.1 (🔴 -0.23)
View detailed metrics

🟢 - Shows an increase in readability
🔴 - Shows a decrease in readability

File Readability FRE GF ARI CLI DCRS
_index.md 100 100 6 6 6 4.9
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 100 100 6 6 6 4.9
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
contribute.md 64.17 65.08 7.32 8.4 11.02 10.26
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
api-namespace-triplet.md 35.05 25.9 13.43 16.2 14.62 8.94
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
attribute.md 32.84 6.17 15.73 9.8 12.98 11
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
index.md 100 100 6 6 6 4.9
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
model.md 15.1 0 14 22 19 8.97
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
part.md 14.79 12.63 13.87 21.7 19 9.92
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
robot.md 16.83 17 13.13 19.7 19 10.81
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
type.md 7.5 0 16.84 22 19 9.82
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
viam-robot-api.md 54.05 41.97 10.77 10.7 11.59 9.09
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
learning-resources.md 57 50.67 11.98 12.6 10.62 7.54
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
local-configuration-file.md 52.01 31.92 11.36 14.6 12.48 6.74
  🟢 +22.79 🟢 +12.79 🟢 +5.02 🟢 +6.5 🟢 +0.47 🟢 +0.61
release-notes.md 31.69 34.94 16.4 22 12.49 7.18
  🟢 +0.69 🟢 +0.21 🟢 +0.13 🟢 +0 🟢 +0.17 🟢 +0.06
troubleshooting.md 58.18 44.44 10.43 12.7 12.18 6.95
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 39.5 32.6 14.32 12.5 14.78 9.03
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 63.65 45.66 8.71 13.8 11.77 5.91
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
eva.md 38.76 36.28 13.87 16.5 12.41 8.92
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
fake.md 49.06 42 12.49 15.5 11.72 7.5
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
ur5e.md 60.91 56.25 9.81 12.3 10.08 8.14
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
xarm6.md 55.8 55.13 10.85 13.5 11.83 7.81
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
xarm7.md 55.8 55.13 10.85 13.5 11.83 7.81
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
xarmlite.md 57.4 55.13 10.58 13.3 11.48 7.7
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
yahboom-dofbot.md 60.16 57.16 10.08 11.9 10.03 8.48
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 68.02 49.11 7.25 13 12.11 5.72
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
agilex-limo.md 47.69 39.63 10.51 14.3 13.16 8.77
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
boat.md 67 51.04 8.55 10.4 10.88 7.16
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
fake.md 49.51 47.79 10.44 14.8 12.81 8.59
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
wheeled.md 55.75 46.88 10.07 13.8 12.7 7.3
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 61.61 44.75 8.81 15.1 12.29 5.63
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
beaglebone.md 43.83 34.22 11 14.5 14.19 8.89
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
fake.md 60.14 55.95 10.03 12.7 11.01 7.66
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
jetson.md 50.03 40.55 10.66 13.1 12.69 8.76
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
numato.md 49.88 40.95 11.72 12.4 12 8.88
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
pca9685.md 70.47 67.65 9.05 9.5 9.5 7.68
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
pi.md 56.04 41.77 10.12 12.1 11.76 8.1
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
ti.md 46.61 34.22 10.47 14 13.61 8.79
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
upboard.md 52.06 43.8 10.02 12.5 12.91 8.81
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 59.52 40.04 8.61 13.2 12.46 6.93
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
align-color-depth-extrinsics.md 61.46 47.79 9.43 12.6 11.59 6.94
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
align-color-depth-homography.md 59.4 48.91 9.67 12.3 11.88 7.52
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
calibrate.md 45.22 38.52 11.38 14.6 13.92 8.55
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
dual-stream.md 64.23 51.95 8.2 11.4 11.75 7.42
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
fake.md 64.81 51.24 8.3 10.9 10.83 7.78
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
ffmpeg.md 67.06 52.46 8.01 10.8 10.88 7.32
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
image-file.md 69.57 58.58 8.52 10.4 10.25 7.04
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
join-color-depth.md 63.99 49.82 8.91 11.4 11.01 7.33
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
join-pointclouds.md 60.74 50.23 8.87 12.2 11.93 7.62
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
rtsp.md 61.27 44.2 8.02 12.3 12.62 7.25
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
single-stream.md 67.92 50.53 7.94 11 10.95 6.87
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
transform.md 59.65 41.06 8.27 13.7 13.39 6.49
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
velodyne.md 19.81 12.22 12.83 20.7 18.44 9.59
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
webcam.md 60.83 46.88 9.92 12.1 10.96 7.33
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 59.17 47.99 8.38 14.4 13.16 6.72
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
model1.md 46.96 44.75 11.89 15.4 12.47 8.33
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 59.94 39.03 8.46 14 12.93 6.26
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
AMS-AS5048.md 44.19 37.71 11.7 15.6 13.8 8.26
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
arduino.md 63.51 56.66 9.5 12.6 10.66 7.13
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
fake.md 56.25 54.42 10.68 14 11.25 7.75
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
incremental.md 42.77 34.15 12.02 17.3 13.52 7.7
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
single.md 51.42 43.32 11.37 14.9 11.84 7.65
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 67.5 47.99 7.57 13 11.48 5.93
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
fake.md 56.43 47.99 9.96 12.8 11.3 8.27
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
multi-axis.md 60.36 55.13 9.98 12.5 10.09 8.07
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
single-axis.md 62.1 56.66 10.15 11.1 10.43 8
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 60.59 48.09 8.06 14.8 12.87 6.4
  🔴 -0.15 🟢 +0 🟢 +0 🔴 -0.1 🟢 +0 🟢 +0
fake.md 57.53 56.55 9.97 12.8 11.42 8.31
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
softrobotics.md 56.88 55.74 9.73 14.3 12.24 7.56
  🟢 +11.12 🟢 +5.88 🟢 +2.32 🟢 +3.1 🟢 +0.52 🟢 +0.29
_index.md 54.47 38.52 9.17 14.9 14.09 6.64
  🟢 +0.02 🟢 +0 🟢 +0.01 🟢 +0 🟢 +0 🟢 +0
gamepad.md 64.52 53.61 10 11.2 10.03 7.3
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
gpio.md 59.32 44.85 10.04 13 12 6.77
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
mux.md 42.25 36.59 12.41 15.3 13.8 8.56
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 64.27 47.69 7.98 13.9 12.4 5.89
  🟢 +7.03 🟢 +3.25 🟢 +1.28 🟢 +1.8 🟢 +0.83 🟢 +0.16
28byj48.md 44.07 42.41 11.56 17.2 13.98 7.81
  🟢 +18.41 🟢 +10.35 🟢 +4.08 🟢 +4.8 🟢 +0.77 🟢 +0.51
dmc4000.md 66.34 56.35 8.52 12.4 11.13 6.64
  🟢 +4.29 🟢 +2.03 🟢 +0.8 🟢 +1.1 🟢 +0.47 🟢 +0.1
fake.md 65.88 52.29 10.18 11.9 9.75 6.52
  🟢 +9.08 🟢 +4.87 🟢 +1.92 🟢 +2.5 🟢 +0.41 🟢 +0.24
_index.md 71.92 63.29 9 10.9 9.63 6.34
  🟢 +10.01 🟢 +5.38 🟢 +2.12 🟢 +2.8 🟢 +0.41 🟢 +0.26
encoded-motor.md 31.92 30.2 14.45 18.8 14.34 8.54
  🟢 +20.06 🟢 +20.3 🟢 +4.55 🟢 +3.2 🟢 +0.76 🟢 +0.99
gpiostepper.md 55.31 49.45 11.54 14.6 10.97 7.18
  🟢 +29.53 🟢 +17.66 🟢 +6.96 🟢 +7.4 🟢 +0.82 🟢 +0.86
roboclaw.md 52.43 45.56 11.11 13.8 12.06 7.99
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
tmc5072.md 64.1 56.05 9.19 12.1 10.9 7.2
  🟢 +3.74 🟢 +1.73 🟢 +0.68 🟢 +1 🟢 +0.41 🟢 +0.08
_index.md 62.2 39.94 7.91 14 12.81 5.95
  🟢 +3.59 🟢 +1.62 🟢 +0.64 🟢 +0.9 🟢 +0.47 🟢 +0.08
adxl345.md 59.76 53.51 9.97 13.3 11.77 7.08
  🟢 +17.13 🟢 +8.12 🟢 +3.34 🟢 +5 🟢 +1 🟢 +0.43
cameramono.md 25.14 17.74 13.19 19.7 16.24 9.44
  🟢 +23.42 🟢 +17.74 🟢 +5.81 🟢 +2.3 🟢 +1.54 🟢 +1.56
fake.md 32.51 33.95 11.4 20.3 15.95 8.79
  🟢 +29.41 🟢 +33.95 🟢 +7.6 🟢 +1.7 🟢 +1.3 🟢 +2.01
_index.md 100 100 6 6 6 4.9
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
gps-nmea-rtk-pmtk.md 52.6 46.06 9.9 14.5 12.93 7.91
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
gps-nmea-rtk-serial.md 48.27 43.73 10.86 15.6 13.34 7.95
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
gps-nmea.md 55.91 46.67 10.26 13.4 12.06 7.6
  🟢 +16.38 🟢 +8.62 🟢 +3.4 🟢 +4.5 🟢 +0.88 🟢 +0.42
_index.md 100 100 6 6 6 4.9
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
imu-vectornav.md 41.1 42.92 11.76 17 13.58 8.92
  🟢 +21.81 🟢 +13.4 🟢 +5.28 🟢 +5 🟢 +0.82 🟢 +0.66
imu-wit.md 45.07 37.71 10.42 15.4 13.57 8.86
  🟢 +13.05 🟢 +6.8 🟢 +2.68 🟢 +3.5 🟢 +0.82 🟢 +0.34
merged.md 51.3 42.31 11.73 14.4 12.36 7.44
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
mpu6050.md 41.8 45.25 11 17.3 14.27 8.79
  🟢 +18.7 🟢 +10.65 🟢 +4.2 🟢 +4.7 🟢 +0.88 🟢 +0.52
viam-visual-odometry.md 56.4 39.74 10.01 11.9 12.75 7.6
  🟢 +4.87 🟢 +2.44 🟢 +0.94 🟢 +1.3 🟢 +0.41 🟢 +0.12
wheeled-odometry.md 54 39.03 10.62 12.7 13.51 7.29
  🔴 -0.15 🟢 +0 🟢 +0 🔴 -0.1 🟢 +0 🟢 +0
pose-tracker.md 73.11 60.31 9.85 6.5 8.68 7.77
  🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0 🟢 +0
_index.md 59.1 40.24 8.05 14.3 13.51 6.41
  🔴 -0.23 🟢 +0 🟢 +0 🔴 -0.1 🔴 -0.06 🟢 +0

Averages:

  Readability FRE GF ARI CLI DCRS
Average 55.78 46.88 10.58 13.07 11.84 7.72
  🟢 +1.33 🟢 +0.89 🟢 +0.29 🟢 +0.31 🟢 +0.06 🟢 +0.05
View metric targets
Metric Range Ideal score
Flesch Reading Ease 100 (very easy read) to 0 (extremely difficult read) 60
Gunning Fog 6 (very easy read) to 17 (extremely difficult read) 8 or less
Auto. Read. Index 6 (very easy read) to 14 (extremely difficult read) 8 or less
Coleman Liau Index 6 (very easy read) to 17 (extremely difficult read) 8 or less
Dale-Chall Readability 4.9 (very easy read) to 9.9 (extremely difficult read) 6.9 or less

6. Paste the raw fragment contents into the **Raw JSON** config field.
7. Click **Save config**.
8. Now, you can edit the config either in **Raw JSON** mode or in **Builder** mode.
4. Toggle to [**Raw JSON** mode](/try-viam/try-viam-tutorial/#raw-json).
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow

@npentrel npentrel changed the title Test prettier linter on docs DOCS-685: Use prettier linter Sep 16, 2023
@npentrel npentrel force-pushed the try-prettier branch 2 times, most recently from b298a95 to fb0710a Compare September 22, 2023 15:56
@npentrel npentrel force-pushed the try-prettier branch 4 times, most recently from a8f8595 to c6f1d88 Compare September 22, 2023 16:29
@npentrel npentrel marked this pull request as ready for review September 22, 2023 17:50
@npentrel npentrel force-pushed the try-prettier branch 4 times, most recently from 830177f to 7c0513c Compare September 22, 2023 18:42
@npentrel npentrel force-pushed the try-prettier branch 3 times, most recently from c5cfe65 to 12fd734 Compare September 22, 2023 19:10
Copy link
Contributor

@andf-viam andf-viam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok wow! LGTM! Left a question about possible clobbering with the python linter we also just added, and noted a few more instances where we could use <!-- prettier-ignore --> if desired.

Lots of big diffs makes me a bit nervous, didn't go through all deeply, but everything I spot checked through looks great! Nice work on this!!

"rightm"
],
"left": ["leftm"],
"right": ["rightm"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is JSON, but conceptually this feels like clobbering with the python linter we also just deployed (py linter enforces expansion of some nested components to new lines, for example, counter to what is happening here)

Will prettier ever try to fix python indenting already handled by the py lintiner? Or vice versa? Or are they carefully scoped: (prettier = MD and JSON but skip py code fences || pylintything = py code fences only)?

If so, no worries, should be good!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prettier skipx python code snippets so all good 😊.

"digital_interrupts": [
"<your-digital_interrupts-name-1>",
"<your-digital_interrupts-name-2>"
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! If the array contains 2+ values, multi-line but if single value = single line (like in docs/components/base/wheeled.md)?? I like that!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's if the values can fit on one line without exceeding 80 chars

@@ -97,7 +98,7 @@ If you have another controller that you want to use to control your robot, feel
## Troubleshooting

- If you are not able to see a drop-down menu with the name of your controller appear in the **Control** tab, try specifying the `dev_file` attribute to match the exact path to your device.
You can also try setting `auto_reconnect` to `True`.
You can also try setting `auto_reconnect` to `True`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? single item UL element is to be ... indented two whitespace characters? Would have expected - per other instances.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a continuation of the previous item not a new one. So the indentation is to match that item

@@ -102,17 +102,17 @@ Edit and fill in the attributes as applicable.

The following attributes are available for a `gps-nmea-rtk-pmtk` movement sensor:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also want a <!-- prettier-ignore --> here too?

@@ -102,15 +101,15 @@ Edit and fill in the attributes as applicable.

The following attributes are available for a `gps-nmea-rtk-pmtk` movement sensor:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also want a <!-- prettier-ignore --> here too?

},
"ticks_per_rotation": 100
},
"depends_on": ["board1", "encoder1"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is odd. Does it have to do that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does that to conserve space if the array is short enough to fit on one line

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern is just that this is different from what the app does--I wish we could get it to match the app so that people can seamlessly cross-reference

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I suppose not a common issue since implicit dependencies are the norm, and most places where we still have anything in depends_on could be removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there were more here it would split onto multiple lines, so we could do that or change the names if we want to ensure it's on two lines, but let's do that separately.

@viambot
Copy link
Member

viambot commented Sep 22, 2023

You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/bb368a369f39e2b2ba210581ee3364f7952f5e24/public

@npentrel npentrel merged commit e4ec622 into viamrobotics:main Sep 22, 2023
@npentrel npentrel deleted the try-prettier branch September 22, 2023 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to build This pull request is marked safe to build from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants