This is just a long supplement comment to @James Cunnane's answer which is correct. Try
dt = 1/100;
T=Pi;
ls = Table[0.1 Cos[30 x] + 2 Sin[x]^2, {x, 0, PiT, dt}];
ListPlot[ls, Mesh -> All, MeshStyle -> Red]
ListPlot[Abs[Fourier[ls]]^2, PlotRange -> {{0, 10}, {0, 1}},
DataRange -> {0, 1/dt}, FrameLabel -> {"Frequency", "Intensity"},
Mesh -> All, MeshStyle -> Red, GridLines -> {{30/(2 \[Pi])}, None},
Frame -> True, Joined -> True]
Note the only thing changed is the duration T whose inverse (1/Pi) defines the grid size in the Fourier spectrum. As a result, the desired frequency 30/Pi is now an integer multiple of the grid size and therefore can be captured correctly.
EDIT
Because the grid size 1/T=1/Pi is not fine enough, it is less easier to observe the lower frequency 2/2Pi (not 1/Pi because it's a sine square). Try to increase T to a larger value would resolve this issue if you like:
dt = 1/100;
T = 5 Pi;
ls = Table[0.1 Cos[30 x] + 2 Sin[x]^2, {x, 0, T, dt}];
ListPlot[Abs[Fourier[ls]]^2, PlotRange -> {{0, 1}, All},
DataRange -> {0, 1/dt}, FrameLabel -> {"Frequency", "Intensity"},
Mesh -> All, MeshStyle -> Red, GridLines -> {{2/(2 \[Pi])}, None},
Frame -> True, Joined -> True]
Last comment: The reason you see a very high peak at zero frequency is due to the constant term when you write Sin[x]^2
as (1 - Cos[2 x])/2
.